Class: Aws::Mon::QMonListMetrics

Inherits:
AwsParser show all
Defined in:
lib/ec2/mon_interface.rb

Constant Summary

Constants inherited from AwsParser

AwsParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from AwsParser

#result, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from AwsParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from Aws::AwsParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aws::AwsParser

Instance Method Details

#resetObject



210
211
212
213
214
# File 'lib/ec2/mon_interface.rb', line 210

def reset
  @result       = []
  @namespace    = ""
  @measure_name = ""
end

#tagend(name) ⇒ Object



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/ec2/mon_interface.rb', line 220

def tagend(name)
  case name
    when 'MeasureName' then
      @measure_name = @text
    when 'Namespace' then
      @namespace = @text
    when 'Name' then
      @metric[:name] = @text
    when 'Value' then
      @metric[:value] = @text
    when 'member' then
      @metric[:namespace]    = @namespace
      @metric[:measure_name] = @measure_name
      @result << @metric
  end
end

#tagstart(name, attributes) ⇒ Object



216
217
218
# File 'lib/ec2/mon_interface.rb', line 216

def tagstart(name, attributes)
  @metric = {} if name == 'member'
end