Class: Rightscale::Slicehost::ZonesParser
- Inherits:
-
RightSlicehostParser
- Object
- RightSlicehostParser
- Rightscale::Slicehost::ZonesParser
- Defined in:
- lib/right_slicehost.rb
Overview
Zones
Constant Summary
Constants inherited from RightSlicehostParser
RightSlicehostParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from RightSlicehostParser
Instance Method Summary collapse
Methods inherited from RightSlicehostParser
#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=
Constructor Details
This class inherits a constructor from Rightscale::RightSlicehostParser
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rightscale::RightSlicehostParser
Instance Method Details
#reset ⇒ Object
559 560 561 |
# File 'lib/right_slicehost.rb', line 559 def reset @result = [] end |
#tagend(name) ⇒ Object
550 551 552 553 554 555 556 557 558 |
# File 'lib/right_slicehost.rb', line 550 def tagend(name) case name when 'id' then @item[:sls_id] = @text.to_i when 'origin' then @item[:origin] = @text when 'ttl' then @item[:ttl] = @text.to_i when 'active' then @item[:active] = @text == 'Y' when 'zone' then @result << @item end end |
#tagstart(name, attributes) ⇒ Object
:nodoc:
547 548 549 |
# File 'lib/right_slicehost.rb', line 547 def (name, attributes) @item = {} if name == 'zone' end |