lib/invokr.rb in invokr-0.0.1 vs lib/invokr.rb in invokr-0.0.2

- old
+ new

@@ -11,9 +11,16 @@ def query_method method Method.new method end Method = Struct.new :method do + def invoke receiver = method.owner, hsh_args + unless receiver == method.owner or receiver.kind_of? method.owner + raise TypeError, "no implicit conversion of #{receiver.class} into #{method.owner.name}" + end + Invokr.invoke method: method.name, on: receiver, with: hsh_args + end + def dependencies map_identifiers parameters end def optional_dependencies