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 Method Summary collapse

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