Created
December 11, 2008 17:12
-
-
Save drio/34786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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