Class: Shippinglogic::FedEx::Proxy
- Inherits:
-
Object
- Object
- Shippinglogic::FedEx::Proxy
- Defined in:
- lib/shippinglogic/fedex/proxy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
permalink #initialize(target) ⇒ Proxy
Returns a new instance of Proxy.
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
permalink #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.
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
permalink #target ⇒ Object
Returns the value of attribute target.
7 8 9 |
# File 'lib/shippinglogic/fedex/proxy.rb', line 7 def target @target end |