Skip to content

Instantly share code, notes, and snippets.

@manleyhimself
Created October 11, 2013 19:12
Show Gist options
  • Select an option

  • Save manleyhimself/6940397 to your computer and use it in GitHub Desktop.

Select an option

Save manleyhimself/6940397 to your computer and use it in GitHub Desktop.
def initialize(attributes)
attributes.each do |attribute, value|
self.class.send(:define_method, attribute) do
@attribute = value
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment