Skip to content

Instantly share code, notes, and snippets.

@jordanhudgens
Created November 4, 2015 16:33
Show Gist options
  • Save jordanhudgens/d1c9ee2bd2412fcf1441 to your computer and use it in GitHub Desktop.
Save jordanhudgens/d1c9ee2bd2412fcf1441 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dish'
hash = {
movie: "Star Wars",
actors: [
{ age: 22, name: "Luke" },
{ age: 35, name: "Han" },
{ age: 400, name: "Yoda" }
],
favorite: true
}
p media = Dish(hash)
p media.movie
p media.actors.length
p media.actors[0].name
p media.actors[1].name
p media.actors[2].name
p media.actors[0].age
p media.favorite?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment