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

#characters, #reset, #start_element

Constructor Details

#initialize(nil_string) ⇒ Basic

Returns a new instance of Basic.



8
9
10
11
# File 'lib/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/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/fog/aws/parsers/simpledb/basic.rb', line 22

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