Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Created June 13, 2012 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlogsdon/2925667 to your computer and use it in GitHub Desktop.
Save jlogsdon/2925667 to your computer and use it in GitHub Desktop.
class Test
def self.runs(thing)
define_method(thing) do |*args|
run_this_method thing, *args
end
end
def run_this_method(thing, *args)
puts "Running #{thing}"
end
runs :bar
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment