Sha256: c06dc4680ac7945da0a0f9e4c8f19eaed41500bef08c70ae3359c3b33a4a5296

Contents?: true

Size: 444 Bytes

Versions: 17

Compression:

Stored size: 444 Bytes

Contents

module Spank
  class Invocation
    attr_reader :instance, :method, :arguments, :result

    def initialize(instance, method, args, block)
      @instance = instance
      @method = method
      @arguments = args
      @block = block
    end

    def proceed
      if @block
        @result = @instance.public_send(@method, @arguments, @block)
      else
        @result = @instance.public_send(@method, @arguments)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
spank-1.1.0 lib/spank/invocation.rb
spank-1.0.1441140881 lib/spank/invocation.rb
spank-1.0.1441140857 lib/spank/invocation.rb
spank-1.0.1441140848 lib/spank/invocation.rb
spank-1.0.1441140841 lib/spank/invocation.rb
spank-1.0.1441140834 lib/spank/invocation.rb
spank-1.0.1441140824 lib/spank/invocation.rb
spank-1.0.1441140809 lib/spank/invocation.rb
spank-1.0.1441140804 lib/spank/invocation.rb
spank-1.0.1441140793 lib/spank/invocation.rb
spank-1.0.1420314444 lib/spank/invocation.rb
spank-0.0.1393558686 lib/spank/invocation.rb
spank-0.0.1385937112 lib/spank/invocation.rb
spank-0.0.1369197619 lib/spank/invocation.rb
spank-0.0.1369197478 lib/spank/invocation.rb
spank-0.0.2 lib/spank/invocation.rb
spank-0.0.1 lib/spank/invocation.rb