Skip to content

Instantly share code, notes, and snippets.

@dewski
Created May 5, 2014 00:33
Show Gist options
  • Save dewski/369293dd40c39a14cc48 to your computer and use it in GitHub Desktop.
Save dewski/369293dd40c39a14cc48 to your computer and use it in GitHub Desktop.
fruits = [
{
:color => 'red',
:type => 'apple'
},
{
:color => 'orange',
:type => 'orange'
}
]
JSONBuilder::Compiler.generate do
fruitBasket 'For Grandma'
fruits(fruits) do |fruit|
fruitType fruit[:type]
color fruit[:color]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment