Created
July 1, 2011 17:22
-
-
Save stephenprater/1059000 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 BlackMagick | |
def keys &block | |
define_method :keys, &block | |
end | |
end | |
class LeThing | |
extend BlackMagick | |
end | |
klass = Class.new(LeThing) do |c| | |
keys do | |
['name','date','magic'] | |
end | |
end | |
#klass.keys => ['name','date','magic'] | |
#Instead I get 'ArgumentError, tried to create Proc object without a block' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment