Sha256: cc03d3aa6bbbce70c45f163e60d909095adaad2400a338922c2190ad3226c97d

Contents?: true

Size: 631 Bytes

Versions: 7

Compression:

Stored size: 631 Bytes

Contents

require 'casting/prepared_delegation'

module Casting
  class Delegation

    attr_reader :prepared_delegation
    private :prepared_delegation

    def initialize(delegated_method_name, client)
      @prepared_delegation = PreparedDelegation.new(:delegated_method_name => delegated_method_name, :client => client)
    end

    def client
      prepared_delegation.client
    end

    def to(object_or_module)
      prepared_delegation.to(object_or_module)
      self
    end

    def with(*args)
      prepared_delegation.with(*args)
      self
    end

    def call(*args)
      prepared_delegation.call(*args)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
casting-0.6.6 lib/casting/delegation.rb
casting-0.6.5 lib/casting/delegation.rb
casting-0.6.4 lib/casting/delegation.rb
casting-0.6.3 lib/casting/delegation.rb
casting-0.6.2 lib/casting/delegation.rb
casting-0.6.1 lib/casting/delegation.rb
casting-0.5.2 lib/casting/delegation.rb