Class: SolidObserver::Services::CableStats::TrendData::BucketSnapshot
- Inherits:
-
Object
- Object
- SolidObserver::Services::CableStats::TrendData::BucketSnapshot
- Defined in:
- lib/solid_observer/services/cable_stats.rb
Instance Attribute Summary collapse
-
#broadcasts_count ⇒ Object
readonly
Returns the value of attribute broadcasts_count.
-
#rejections_count ⇒ Object
readonly
Returns the value of attribute rejections_count.
Instance Method Summary collapse
- #add(row) ⇒ Object
-
#initialize ⇒ BucketSnapshot
constructor
A new instance of BucketSnapshot.
- #value_for(key) ⇒ Object
Constructor Details
#initialize ⇒ BucketSnapshot
Returns a new instance of BucketSnapshot.
54 55 56 57 |
# File 'lib/solid_observer/services/cable_stats.rb', line 54 def initialize @broadcasts_count = 0 @rejections_count = 0 end |
Instance Attribute Details
#broadcasts_count ⇒ Object (readonly)
Returns the value of attribute broadcasts_count.
52 53 54 |
# File 'lib/solid_observer/services/cable_stats.rb', line 52 def broadcasts_count @broadcasts_count end |
#rejections_count ⇒ Object (readonly)
Returns the value of attribute rejections_count.
52 53 54 |
# File 'lib/solid_observer/services/cable_stats.rb', line 52 def rejections_count @rejections_count end |
Instance Method Details
#add(row) ⇒ Object
59 60 61 62 |
# File 'lib/solid_observer/services/cable_stats.rb', line 59 def add(row) @broadcasts_count += row[1].to_i @rejections_count += row[4].to_i end |
#value_for(key) ⇒ Object
64 65 66 |
# File 'lib/solid_observer/services/cable_stats.rb', line 64 def value_for(key) public_send(key) end |