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.
Instance Method Summary collapse
Methods inherited from Sappy::Response
#failure, #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(hash) ⇒ Object
6 7 8 9 10 |
# File 'lib/sappy/responses/summary_statistics.rb', line 6 def success(hash) hash["summarystatistics"].first.each do |stat,value| instance_variable_set("@#{stat}", value.to_i) end end |