Class: Fog::Parsers::DNS::AWS::ListResourceRecordSets
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::DNS::AWS::ListResourceRecordSets
- Defined in:
- lib/fog/aws/parsers/dns/list_resource_record_sets.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#attr_value, #characters, #initialize, #start_element, #value
Constructor Details
This class inherits a constructor from Fog::Parsers::Base
Instance Method Details
#end_element(name) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fog/aws/parsers/dns/list_resource_record_sets.rb', line 17 def end_element(name) if @section == :resource_record_set case name when 'Name', 'Type', 'TTL' @resource_record_set[name] = value when 'Value' @resource_record_set['ResourceRecords'] << value when 'ResourceRecordSet' @response['ResourceRecordSets'] << @resource_record_set @resource_record_set = {} @resource_record_set['ResourceRecords'] = [] when 'ResourceRecordSets' @section = :main end elsif @section == :main case name when 'MaxItems' @response[name]= value.to_i when 'IsTruncated', 'NextRecordName', 'NextRecordType' @response[name]= value end end end |
#reset ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/fog/aws/parsers/dns/list_resource_record_sets.rb', line 8 def reset @resource_record = [] @resource_record_set = {} @resource_record_set['ResourceRecords'] = [] @response = {} @response['ResourceRecordSets'] = [] @section = :resource_record_set end |