Skip to content

Instantly share code, notes, and snippets.

@daymun
Created March 26, 2013 19:24
Show Gist options
  • Save daymun/5248360 to your computer and use it in GitHub Desktop.
Save daymun/5248360 to your computer and use it in GitHub Desktop.
ruby syntax tricks
[:year, :month, :day].each { |m| delegate m, to: :child_model }
def_each :failure, :error do |method_name|
self.state = method_name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment