Class: Fog::Parsers::AWS::SimpleDB::Basic
- Defined in:
- lib/rackspace-fog/aws/parsers/simpledb/basic.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #end_element(name) ⇒ Object
-
#initialize(nil_string) ⇒ Basic
constructor
A new instance of Basic.
- #sdb_decode(value) ⇒ Object
Methods inherited from Base
#attr_value, #characters, #reset, #start_element, #value
Constructor Details
#initialize(nil_string) ⇒ Basic
Returns a new instance of Basic.
8 9 10 11 |
# File 'lib/rackspace-fog/aws/parsers/simpledb/basic.rb', line 8 def initialize(nil_string) @nil_string = nil_string reset end |
Instance Method Details
#end_element(name) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/rackspace-fog/aws/parsers/simpledb/basic.rb', line 13 def end_element(name) case(name) when 'BoxUsage' response[name] = value.to_f when 'RequestId' response[name] = value end end |
#sdb_decode(value) ⇒ Object
22 23 24 |
# File 'lib/rackspace-fog/aws/parsers/simpledb/basic.rb', line 22 def sdb_decode(value) value.eql?(@nil_string) ? nil : value end |