Skip to content

Instantly share code, notes, and snippets.

@drio
Created December 11, 2008 17:12
Show Gist options
  • Save drio/34786 to your computer and use it in GitHub Desktop.
Save drio/34786 to your computer and use it in GitHub Desktop.
module Foo
%w{ mount umount }.each do |m|
self.module_eval "def self.#{m}; puts '#{m}'; end"
end
end
Foo.mount
Foo.umount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment