Class: FullCircle::ResponseParser
- Inherits:
-
Object
- Object
- FullCircle::ResponseParser
- Defined in:
- lib/full_circle/response_parser.rb
Instance Attribute Summary collapse
-
#api_method_name ⇒ Object
readonly
Returns the value of attribute api_method_name.
-
#object_name ⇒ Object
readonly
Returns the value of attribute object_name.
Instance Method Summary collapse
-
#initialize(api_method_name, object_name) ⇒ ResponseParser
constructor
A new instance of ResponseParser.
- #parse(response) ⇒ Object
Constructor Details
#initialize(api_method_name, object_name) ⇒ ResponseParser
Returns a new instance of ResponseParser.
6 7 8 9 |
# File 'lib/full_circle/response_parser.rb', line 6 def initialize(api_method_name, object_name) @api_method_name= api_method_name @object_name = object_name end |
Instance Attribute Details
#api_method_name ⇒ Object (readonly)
Returns the value of attribute api_method_name.
4 5 6 |
# File 'lib/full_circle/response_parser.rb', line 4 def api_method_name @api_method_name end |
#object_name ⇒ Object (readonly)
Returns the value of attribute object_name.
4 5 6 |
# File 'lib/full_circle/response_parser.rb', line 4 def object_name @object_name end |
Instance Method Details
#parse(response) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/full_circle/response_parser.rb', line 11 def parse(response) if response attrs = response.parsed_response parse_response(attrs, response_name, object_name) end end |