lib/surrogate/hatchery.rb in surrogate-0.3.2 vs lib/surrogate/hatchery.rb in surrogate-0.4.2
- old
+ new
@@ -28,15 +28,15 @@
end
private
def klass_can_define_api_methods
- klass.singleton_class.send :define_method, :define, &method(:define)
+ klass.singleton_class.__send__ :define_method, :define, &method(:define)
end
def add_api_method_for(method_name)
- klass.send :define_method, method_name do |*args, &block|
+ klass.__send__ :define_method, method_name do |*args, &block|
@hatchling.invoke_method method_name, args, &block
end
end
def add_verb_helpers_for(method_name)
@@ -46,10 +46,10 @@
def add_noun_helpers_for(method_name)
add_helpers_for method_name, "will_have_#{method_name}"
end
def add_helpers_for(method_name, helper_name)
- klass.send :define_method, helper_name do |*args, &block|
+ klass.__send__ :define_method, helper_name do |*args, &block|
@hatchling.prepare_method method_name, args, &block
self
end
end
end