Class: AwsSdb::Response::Base
- Inherits:
-
Object
- Object
- AwsSdb::Response::Base
- Defined in:
- lib/aws_sdb_bare/response.rb
Direct Known Subclasses
DomainMetadata, GetAttributes, ListDomains, Query, QueryWithAttributes, Select
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(doc) ⇒ Base
constructor
A new instance of Base.
- #metadata ⇒ Object
-
#token ⇒ Object
the token to get the following chunk of response in case the response is broken in parts due to the size limit being exceeded.
Constructor Details
#initialize(doc) ⇒ Base
Returns a new instance of Base.
60 61 62 |
# File 'lib/aws_sdb_bare/response.rb', line 60 def initialize(doc) @doc = doc end |
Class Method Details
.has_items ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/aws_sdb_bare/response.rb', line 47 def has_items define_method :items do @items ||= begin (@doc / 'Item').inject({}) do |items_hash, item| items_hash[item.at('Name').inner_html] = attributes_hash(item) items_hash end end end end |
Instance Method Details
#metadata ⇒ Object
64 65 66 |
# File 'lib/aws_sdb_bare/response.rb', line 64 def @metadata ||= Metadata.new(@doc.at('ResponseMetadata')) end |
#token ⇒ Object
the token to get the following chunk of response in case the response is broken in parts due to the size limit being exceeded
70 71 72 73 74 |
# File 'lib/aws_sdb_bare/response.rb', line 70 def token if token_element = @doc.at('NextToken') token_element.inner_html end end |