Skip to content

Instantly share code, notes, and snippets.

@eric-wood
Last active August 29, 2015 14:17
Show Gist options
  • Save eric-wood/5404401d638acc2f3c60 to your computer and use it in GitHub Desktop.
Save eric-wood/5404401d638acc2f3c60 to your computer and use it in GitHub Desktop.
class Shoutout
%w(yo yoyo yoyoma).each do |action|
define_method("perform_#{action}") do |argument|
"performing #{action.gsub('_', ' ')}"
end
end
end
shout = Shoutout.new
puts shout.yo()
puts shout.yoyo()
puts shout.yoyoma()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment