[Rails] how to create custom yaml
I need to create a method that should return yaml in the following
format
---
- name: device-1
parameters:
app_folder: deploy_project
app_id: "1"
tar_file: deploy_project.tar.gz
profile_id: "3"
version_id: "2"
classes:
- install
I have all these values (device-1, deploye-project etc) captured into a
variable "result" that are coming from the database but i just need to
return them in the above format as a yaml using
puts yaml_obj = result.to_yaml
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home