Class: RightAws::AcfInterface::AcfDistributionConfigParser

Inherits:
RightAWSParser show all
Defined in:
lib/acf/right_acf_interface.rb

Overview

:nodoc:

Constant Summary

Constants inherited from RightAWSParser

RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAWSParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAWSParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagstart, #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



364
365
366
# File 'lib/acf/right_acf_interface.rb', line 364

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

#tagend(name) ⇒ Object



367
368
369
370
371
372
373
374
375
# File 'lib/acf/right_acf_interface.rb', line 367

def tagend(name)
  case name
    when 'Origin'           then @result[:origin]           = @text
    when 'CallerReference'  then @result[:caller_reference] = @text
    when 'Comment'          then @result[:comment]          = AcfInterface::unescape(@text)
    when 'Enabled'          then @result[:enabled]          = @text == 'true' ? true : false
    when 'CNAME'            then @result[:cnames]          << @text
  end
end