Class: RightAws::RdsInterface::DescribeReservedDBInstancesParser

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

Overview

:nodoc:

Constant Summary

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



1354
1355
1356
# File 'lib/rds/right_rds_interface.rb', line 1354

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

#tagend(name) ⇒ Object



1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
# File 'lib/rds/right_rds_interface.rb', line 1362

def tagend(name)
  case name
  when 'Marker'                        then @result[:marker]            = @text
  when 'MaxRecords'                    then @result[:max_records]       = @text.to_i
  when 'DBInstanceClass'               then @item[:instance_class]      = @text
  when 'CurrencyCode'                  then @item[:currency_code]       = @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[:offering_aws_id]     = @text
  when 'ReservedDBInstanceId'          then @item[:aws_id]              = @text
  when 'State'                         then @item[:state]               = @text
  when 'DBInstanceCount'               then @item[:instance_count]      = @text.to_i
  when 'StartTime'                     then @item[:start_time]          = @text
  when 'ReservedDBInstance'            then @result[:reserved_db_instances] << @item
  end
end

#tagstart(name, attributes) ⇒ Object



1357
1358
1359
1360
1361
# File 'lib/rds/right_rds_interface.rb', line 1357

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