Class: Shippinglogic::FedEx::Service
- Inherits:
-
Object
- Object
- Shippinglogic::FedEx::Service
- Includes:
- HTTParty, Attributes, Request, Response, Validation
- Defined in:
- lib/shippinglogic/fedex/service.rb
Constant Summary
Constants included from Response
Response::SUCCESSFUL_SEVERITIES
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
Instance Method Summary collapse
-
#initialize(base, attributes = {}) ⇒ Service
constructor
Accepts the base service object as a single parameter so that we can access authentication credentials and options.
Methods included from Validation
Methods included from Attributes
Constructor Details
#initialize(base, attributes = {}) ⇒ Service
Accepts the base service object as a single parameter so that we can access authentication credentials and options.
22 23 24 25 |
# File 'lib/shippinglogic/fedex/service.rb', line 22 def initialize(base, attributes = {}) self.base = base super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
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.
30 31 32 |
# File 'lib/shippinglogic/fedex/service.rb', line 30 def method_missing(name, *args, &block) target.send(name, *args, &block) end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
18 19 20 |
# File 'lib/shippinglogic/fedex/service.rb', line 18 def base @base end |