Class: HookBridge::TimeSeriesMetrics
- Inherits:
-
Object
- Object
- HookBridge::TimeSeriesMetrics
- Defined in:
- lib/hookbridge/types.rb
Instance Attribute Summary collapse
-
#buckets ⇒ Object
readonly
Returns the value of attribute buckets.
-
#window ⇒ Object
readonly
Returns the value of attribute window.
Instance Method Summary collapse
-
#initialize(data) ⇒ TimeSeriesMetrics
constructor
A new instance of TimeSeriesMetrics.
Constructor Details
#initialize(data) ⇒ TimeSeriesMetrics
Returns a new instance of TimeSeriesMetrics.
280 281 282 283 |
# File 'lib/hookbridge/types.rb', line 280 def initialize(data) @window = data["window"] @buckets = (data["buckets"] || []).map { |entry| TimeSeriesBucket.new(entry) } end |
Instance Attribute Details
#buckets ⇒ Object (readonly)
Returns the value of attribute buckets.
278 279 280 |
# File 'lib/hookbridge/types.rb', line 278 def buckets @buckets end |
#window ⇒ Object (readonly)
Returns the value of attribute window.
278 279 280 |
# File 'lib/hookbridge/types.rb', line 278 def window @window end |