Class: RightAws::RdsInterface::DescribeReservedDBInstancesOfferingsParser

Inherits:
RightAws::RightAWSParser show all
Defined in:
lib/rds/right_rds_interface.rb

Overview


DB Reserved Instances

Constant Summary

Constants inherited from RightAws::RightAWSParser

RightAws::RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAws::RightAWSParser

#full_tag_name, #result, #tag, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAws::RightAWSParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from RightAws::RightAWSParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser

Instance Method Details

#resetObject

:nodoc:



1328
1329
1330
# File 'lib/rds/right_rds_interface.rb', line 1328

def reset
  @result = { :reserved_db_instances_offerings => [] }
end

#tagend(name) ⇒ Object



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
# File 'lib/rds/right_rds_interface.rb', line 1336

def tagend(name)
  case name
  when 'Marker'                        then @result[:marker]            = @text
  when 'MaxRecords'                    then @result[:max_records]       = @text.to_i
  when 'CurrencyCode'                  then @item[:currency_code]       = @text
  when 'DBInstanceClass'               then @item[:instance_class]      = @text
  when 'Duration'                      then @item[:duration]            = @text.to_i
  when 'FixedPrice'                    then @item[:fixed_price]         = @text.to_f
  when 'UsagePrice'                    then @item[:usage_price]         = @text.to_f
  when 'MultiAZ'                       then @item[:multi_az]            = (@text == 'true')
  when 'ProductDescription'            then @item[:product_description] = @text
  when 'ReservedDBInstancesOfferingId' then @item[:aws_id]              = @text
  when 'ReservedDBInstancesOffering'   then @result[:reserved_db_instances_offerings] << @item
  end
end

#tagstart(name, attributes) ⇒ Object



1331
1332
1333
1334
1335
# File 'lib/rds/right_rds_interface.rb', line 1331

def tagstart(name, attributes)
  case name
  when 'ReservedDBInstancesOffering' then @item = {}
  end
end