Skip to content

Instantly share code, notes, and snippets.

@leejarvis
Last active August 29, 2015 14:22
Show Gist options
  • Save leejarvis/65889996aa3237c2d28d to your computer and use it in GitHub Desktop.
Save leejarvis/65889996aa3237c2d28d to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
class Foo
def update(attrs = {})
self.class.new(self.attrs.merge(attrs))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment