Class: Rightscale::Slicehost::ImagesParser

Inherits:
RightSlicehostParser show all
Defined in:
lib/right_slicehost.rb

Overview


Images


Constant Summary

Constants inherited from RightSlicehostParser

RightSlicehostParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightSlicehostParser

#result, #xml_lib, #xmlpath

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

#resetObject



460
461
462
# File 'lib/right_slicehost.rb', line 460

def reset
  @result = []
end

#tagend(name) ⇒ Object



453
454
455
456
457
458
459
# File 'lib/right_slicehost.rb', line 453

def tagend(name)
  case name
  when 'id'    then @item[:sls_id] = @text.to_i
  when 'name'  then @item[:name]   = @text
  when 'image' then @result       << @item
  end
end

#tagstart(name, attributes) ⇒ Object

:nodoc:



450
451
452
# File 'lib/right_slicehost.rb', line 450

def tagstart(name, attributes)
  @item = {} if name == 'image'
end