Created
August 23, 2009 12:25
-
-
Save ehlyzov/173255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people":[ | |
{ | |
"person":{ | |
"animals":[ | |
{ | |
"animal":{ | |
"id":416016843, | |
"name":"Poiyo", | |
"pet_type":"fish", | |
"toys":[ | |
{ | |
"toy":{ | |
"id":927160714, | |
"label":"LHC", | |
"pet_id":"416016843", | |
"price":1000000, | |
"railsize":"We are happy to code with power of Ruby and Rails", | |
"toy_id":"927160714" | |
} | |
}, | |
{ | |
"toy":{ | |
"id":893961453, | |
"label":"Humanity", | |
"pet_id":"416016843", | |
"price":10, | |
"railsize":"We are happy to code with power of Ruby and Rails", | |
"toy_id":"893961453" | |
} | |
} | |
] | |
} | |
} | |
], | |
"enhanced_name":"Eugene!!!", | |
"hello_world":"Hello world!", | |
"login":"Eugene" | |
} | |
}, | |
{ | |
"person":{ | |
"animals":[ | |
{ | |
"animal":{ | |
"id":992251607, | |
"name":"Skooby Doo", | |
"pet_type":"dog", | |
"toys":[ | |
{ | |
"toy":{ | |
"id":893961453, | |
"label":"Humanity", | |
"pet_id":"992251607", | |
"price":10, | |
"railsize":"We are happy to code with power of Ruby and Rails", | |
"toy_id":"893961453" | |
} | |
}, | |
{ | |
"toy":{ | |
"id":850957175, | |
"label":"continents", | |
"pet_id":"992251607", | |
"price":1000, | |
"railsize":"We are happy to code with power of Ruby and Rails", | |
"toy_id":"850957175" | |
} | |
} | |
] | |
} | |
} | |
], | |
"enhanced_name":"Ivan!!!", | |
"hello_world":"Hello world!", | |
"login":"Ivan" | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-@humans => people | |
:only | |
.name => login | |
:code => enhanced_name | |
name + "!!!" | |
:code => hello_world | |
"Hello world!" | |
+pets => animals | |
:except | |
.human_id | |
.pet_type_id | |
+toys | |
:methods | |
.railsize("We ","are happy ","to code ","with power of X ","and Y") | |
<pet_type | |
:only | |
.class_name => pet_type | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can somebody decode and explain how to display it normal html..
@humans.each do |person|
puts "login:"+person.name
puts ","
puts "enhanced_name:"+person.name+"!!!"
...
...
end