lib/to_proc.rb in to_proc-0.0.2 vs lib/to_proc.rb in to_proc-0.0.3
- old
+ new
@@ -1,7 +1,9 @@
-ToProc = -> name do
- Module.new do
- define_method :to_proc do
- method(name).to_proc
+module ToProc
+ def self.[] name
+ Module.new do
+ define_method :to_proc do
+ method(name).to_proc
+ end
end
end
end