Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created May 16, 2012 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsavkin/2709850 to your computer and use it in GitHub Desktop.
Save vsavkin/2709850 to your computer and use it in GitHub Desktop.
Struct.new
class Person < Struct.new(:name, :age)
def to_s
"#{name} is #{age} years old"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment