Class: RightAws::Route53Interface::ListResourceRecordSetsParser

Inherits:
RightAws::RightAWSParser show all
Defined in:
lib/route_53/right_route_53_interface.rb

Overview


Resource Records Set

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:



598
599
600
# File 'lib/route_53/right_route_53_interface.rb', line 598

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

#tagend(name) ⇒ Object



606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/route_53/right_route_53_interface.rb', line 606

def tagend(name)
  case name
  when 'IsTruncated'       then @result[:is_truncated]     = @text == 'true'
  when 'NextRecordName'    then @result[:next_record_name] = @text
  when 'NextRecordType'    then @result[:next_record_type] = @text
  when 'MaxItems'          then @result[:max_items]        = @text.to_i
  when 'Type'              then @item[:type]     = @text
  when 'Name'              then @item[:name]     = @text
  when 'TTL'               then @item[:ttl]      = @text.to_i
  when 'ResourceRecordSet' then @result[:items] << @item
  else
    case full_tag_name
    when %r{/ResourceRecord/Value}     then (@item[:resource_records] ||= []) << @text
    when %r{/AliasTarget/DNSName}      then (@item[:alias_target] ||= {})[:dns_name] = @text
    when %r{/AliasTarget/HostedZoneId} then (@item[:alias_target] ||= {})[:hosted_zone_id] = @text
    end
  end
end

#tagstart(name, attributes) ⇒ Object



601
602
603
604
605
# File 'lib/route_53/right_route_53_interface.rb', line 601

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