Skip to content

Instantly share code, notes, and snippets.

/hmm.rb Secret

Created February 9, 2014 20:18
Show Gist options
  • Save anonymous/30c017169013ad9e7c88 to your computer and use it in GitHub Desktop.
Save anonymous/30c017169013ad9e7c88 to your computer and use it in GitHub Desktop.
# clearly a syntax error but how would I pass in a list of multiple options?
shared_options = [
{ :foo, { default: 'hello' } },
{ :bar, { default: 'world' } },
{ :baz, { required: true } }
]
method_option *shared_options
def some_method
# this method uses all of the shared_options
end
method_option *shared_options
def another_method
# this method also uses the same shared options
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment