Class: SearsApi::Response
- Inherits:
-
Object
- Object
- SearsApi::Response
- Includes:
- MethodMissingDeligation
- Defined in:
- lib/sears-api.rb
Instance Attribute Summary collapse
-
#deligate ⇒ Object
Returns the value of attribute deligate.
-
#resp ⇒ Object
Returns the value of attribute resp.
Instance Method Summary collapse
-
#initialize(resp) ⇒ Response
constructor
A new instance of Response.
Methods included from MethodMissingDeligation
Constructor Details
#initialize(resp) ⇒ Response
Returns a new instance of Response.
80 81 82 83 84 85 86 |
# File 'lib/sears-api.rb', line 80 def initialize(resp) @resp = resp %w[MercadoResult ProductDetail PromotionDetails showStoreLocator].each do |y| self.extend eval(ActiveSupport::Inflector.camelize(y)) if Ick::Try.instance.invoke(resp) {|x| x.first.first} == y end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SearsApi::MethodMissingDeligation
Instance Attribute Details
#deligate ⇒ Object
Returns the value of attribute deligate.
76 77 78 |
# File 'lib/sears-api.rb', line 76 def deligate @deligate end |
#resp ⇒ Object
Returns the value of attribute resp.
76 77 78 |
# File 'lib/sears-api.rb', line 76 def resp @resp end |