Class: Fog::Parsers::AWS::SimpleDB::Basic

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/simpledb/basic.rb

Direct Known Subclasses

DomainMetadata, GetAttributes, ListDomains, Select

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #reset, #start_element, #start_element_namespace, #value

Constructor Details

#initialize(nil_string) ⇒ Basic

Returns a new instance of Basic.



6
7
8
9
# File 'lib/fog/aws/parsers/simpledb/basic.rb', line 6

def initialize(nil_string)
  @nil_string = nil_string
  reset
end

Instance Method Details

#end_element(name) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/fog/aws/parsers/simpledb/basic.rb', line 11

def end_element(name)
  case(name)
  when 'BoxUsage'
    response[name] = value.to_f
  when 'RequestId'
    response[name] = value
  end
end

#sdb_decode(value) ⇒ Object



20
21
22
# File 'lib/fog/aws/parsers/simpledb/basic.rb', line 20

def sdb_decode(value)
  value.eql?(@nil_string) ? nil : value
end