Class: RightAws::RdsInterface::DescribeReservedDBInstancesParser

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

Overview

:nodoc:

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



1282
1283
1284
# File 'lib/rds/right_rds_interface.rb', line 1282

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

#tagend(name) ⇒ Object



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
# File 'lib/rds/right_rds_interface.rb', line 1290

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 '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 'ReservedDBInstance'            then @result[:reserved_db_instances] << @item
  end
end

#tagstart(name, attributes) ⇒ Object



1285
1286
1287
1288
1289
# File 'lib/rds/right_rds_interface.rb', line 1285

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