lib/surrounded/context/negotiator.rb in surrounded-0.3.0 vs lib/surrounded/context/negotiator.rb in surrounded-0.3.1
- old
+ new
@@ -9,16 +9,16 @@
end
end
private
- def initialize(object, behavior)
- @object, @behavior = object, behavior
+ def initialize(object, behaviors)
+ @object, @behaviors = object, behaviors
end
def method_missing(meth, *args, &block)
- if @behavior.instance_methods.include?(meth)
- the_method = @behavior.instance_method(meth)
+ if @behaviors.instance_methods.include?(meth)
+ the_method = @behaviors.instance_method(meth)
the_method.bind(@object).call(*args, &block)
else
@object.send(meth, *args, &block)
end
end
\ No newline at end of file