lib/jot/ruby/operation.rb in jot-ruby-0.1.3 vs lib/jot/ruby/operation.rb in jot-ruby-0.1.4
- old
+ new
@@ -6,18 +6,16 @@
DEFAULT_METHODS = RAW_RESULT_METHODS + OPERATION_RESULT_METHODS
extend Utils::Snippets
not_implemented *DEFAULT_METHODS
- OPERATION_RESULT_METHODS.each do |method_name|
- define_method method_name do |*args|
- self.class.new(super(*args))
- end
- end
-
- RAW_RESULT_METHODS.each do |method_name|
- define_method method_name do |*args|
- super(*args)
+ module OriginalOperationMethods
+ OPERATION_RESULT_METHODS.each do |method_name|
+ class_eval <<-EOS
+ def #{method_name} *args
+ self.class.new(super(*args))
+ end
+ EOS
end
end
end
end
end