Class: Shippinglogic::FedEx::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/shippinglogic/fedex/proxy.rb

Direct Known Subclasses

Service

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Proxy

Returns a new instance of Proxy.

[View source]

9
10
11
# File 'lib/shippinglogic/fedex/proxy.rb', line 9

def initialize(target)
  self.target = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (protected)

We undefined a lot of methods at the beginning of this class. The only methods present in this class are ones that we need, everything else is delegated to our target object.

[View source]

16
17
18
# File 'lib/shippinglogic/fedex/proxy.rb', line 16

def method_missing(name, *args, &block)
  target.send(name, *args, &block)
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.


7
8
9
# File 'lib/shippinglogic/fedex/proxy.rb', line 7

def target
  @target
end