Class: Peddler::ResponseWrapper
- Inherits:
-
Object
- Object
- Peddler::ResponseWrapper
- Extended by:
- Forwardable
- Defined in:
- lib/peddler/response_wrapper.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #document ⇒ Object
-
#initialize(response) ⇒ ResponseWrapper
constructor
A new instance of ResponseWrapper.
- #next_token ⇒ Object
- #xml_payload ⇒ Object
Constructor Details
#initialize(response) ⇒ ResponseWrapper
Returns a new instance of ResponseWrapper.
12 13 14 |
# File 'lib/peddler/response_wrapper.rb', line 12 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/peddler/response_wrapper.rb', line 10 def response @response end |
Instance Method Details
#document ⇒ Object
16 17 18 |
# File 'lib/peddler/response_wrapper.rb', line 16 def document Nokogiri::XML(body) end |
#next_token ⇒ Object
27 28 29 30 |
# File 'lib/peddler/response_wrapper.rb', line 27 def next_token node = xml_payload.at_xpath('xmlns:NextToken') node.text if node end |