Class: SoapyCake::Response
- Inherits:
-
Object
- Object
- SoapyCake::Response
- Includes:
- Helper
- Defined in:
- lib/soapy_cake/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#short_response ⇒ Object
readonly
Returns the value of attribute short_response.
-
#time_offset ⇒ Object
Returns the value of attribute time_offset.
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(body, short_response) ⇒ Response
constructor
A new instance of Response.
Methods included from Helper
#const_lookup, #require_params, #translate_booleans!, #translate_values!, #validate_id, #walk_tree
Constructor Details
#initialize(body, short_response) ⇒ Response
Returns a new instance of Response.
8 9 10 11 |
# File 'lib/soapy_cake/response.rb', line 8 def initialize(body, short_response) @body = body @short_response = short_response end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/soapy_cake/response.rb', line 6 def body @body end |
#short_response ⇒ Object (readonly)
Returns the value of attribute short_response.
6 7 8 |
# File 'lib/soapy_cake/response.rb', line 6 def short_response @short_response end |
#time_offset ⇒ Object
Returns the value of attribute time_offset.
5 6 7 |
# File 'lib/soapy_cake/response.rb', line 5 def time_offset @time_offset end |
Instance Method Details
#collection ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/soapy_cake/response.rb', line 13 def collection check_errors! return typed_element(sax.at_depth(3).first) if short_response sax.at_depth(5).map do |element| typed_element(element) end end |