Class: RightAws::AsInterface::DescribeTriggersParser
- Inherits:
-
RightAWSParser
- Object
- RightAWSParser
- RightAws::AsInterface::DescribeTriggersParser
- Defined in:
- lib/as/right_as_interface.rb
Overview
PARSERS: Triggers
Constant Summary
Constants inherited from RightAWSParser
RightAWSParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from RightAWSParser
Instance Method Summary collapse
Methods inherited from 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
#reset ⇒ Object
683 684 685 686 |
# File 'lib/as/right_as_interface.rb', line 683 def reset @p = 'DescribeTriggersResponse/DescribeTriggersResult/Triggers' @result = [] end |
#tagend(name) ⇒ Object
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/as/right_as_interface.rb', line 659 def tagend(name) case name when 'AutoScalingGroupName' then @item[:auto_scaling_group_name] = @text when 'MeasureName' then @item[:measure_name] = @text when 'CreatedTime' then @item[:created_time] = Time::parse(@text) when 'BreachDuration' then @item[:breach_duration] = @text.to_i when 'UpperBreachScaleIncrement' then @item[:upper_breach_scale_increment] = @text.to_i when 'UpperThreshold' then @item[:upper_threshold] = @text.to_f when 'LowerThreshold' then @item[:lower_threshold] = @text.to_f when 'LowerBreachScaleIncrement' then @item[:lower_breach_scale_increment] = @text.to_i when 'Period' then @item[:period] = @text.to_i when 'Status' then @item[:status] = @text when 'TriggerName' then @item[:trigger_name] = @text when 'Statistic' then @item[:statistic] = @text when 'Unit' then @item[:unit] = @text when 'Name' then @dimension[:name] = @text when 'Value' then @dimension[:value] = @text when 'member' case @xmlpath when "#@p/member/Dimensions" then @item[:dimensions][@dimension[:name]] = @dimension[:value] when @p then @result << @item end end end |
#tagstart(name, attributes) ⇒ Object
:nodoc:
648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/as/right_as_interface.rb', line 648 def (name, attributes) case name when 'member' case @xmlpath when 'DescribeTriggersResponse/DescribeTriggersResult/Triggers' @item = { :dimensions => {} } when 'DescribeTriggersResponse/DescribeTriggersResult/Triggers/member/Dimensions' @dimension = {} end end end |