Class: Sappy::Responses::SummaryStatistics
- Inherits:
-
Sappy::Response
- Object
- Sappy::Response
- Sappy::Responses::SummaryStatistics
- Defined in:
- lib/sappy/responses/summary_statistics.rb
Instance Attribute Summary collapse
-
#down ⇒ Object
readonly
Returns the value of attribute down.
-
#inactive ⇒ Object
readonly
Returns the value of attribute inactive.
-
#up ⇒ Object
readonly
Returns the value of attribute up.
Attributes inherited from Sappy::Response
Instance Method Summary collapse
Methods inherited from Sappy::Response
#error_response, #error_response?, #failure, #first_xpath, #initialize, parse, #parse
Constructor Details
This class inherits a constructor from Sappy::Response
Instance Attribute Details
#down ⇒ Object (readonly)
Returns the value of attribute down.
4 5 6 |
# File 'lib/sappy/responses/summary_statistics.rb', line 4 def down @down end |
#inactive ⇒ Object (readonly)
Returns the value of attribute inactive.
4 5 6 |
# File 'lib/sappy/responses/summary_statistics.rb', line 4 def inactive @inactive end |
#up ⇒ Object (readonly)
Returns the value of attribute up.
4 5 6 |
# File 'lib/sappy/responses/summary_statistics.rb', line 4 def up @up end |
Instance Method Details
#success ⇒ Object
6 7 8 9 10 11 |
# File 'lib/sappy/responses/summary_statistics.rb', line 6 def success node = first_xpath('//summarystatistics') @up = node['up'].to_i @down = node['down'].to_i @inactive = node['inactive'].to_i end |