Skip to content

Instantly share code, notes, and snippets.

@mmay
Created August 28, 2013 19:01
Show Gist options
  • Save mmay/6369888 to your computer and use it in GitHub Desktop.
Save mmay/6369888 to your computer and use it in GitHub Desktop.
# "Stuff" is a java object with a default constructor
# In the style of ruby open struct
stuff = Stuff.new(attr1: "value1", attr2: "value2")
# VS
# typcial get/set style
stuff = Stuff.new
stuff.attr1 = "value1"
stuff.attr2 = "value2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment