Today I Learned

hashrocket A Hashrocket project

Ruby define_method with optional args

You can specify optional arguments in a define_method call in ruby:

define_method :my_method do |options = {}|
  # do stuff
See More #ruby TILs
Looking for help? Each developer at Hashrocket has years of experience working with Ruby applications of all types and sizes. We're an active presence at Ruby conferences, have written some of the most popular gems, and have worked on many of the web's Ruby on Rails success stories. Contact us today to talk about your Ruby project.