Skip to content

Instantly share code, notes, and snippets.

@inem
Forked from ehlyzov/result.js
Created August 23, 2009 12:59
Show Gist options
  • Save inem/173258 to your computer and use it in GitHub Desktop.
Save inem/173258 to your computer and use it in GitHub Desktop.
{
"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"
}
}
]
}
-@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 PHP ","and Django")
<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