Class: Jetmeter::CloseAccumulator
- Inherits:
-
Object
- Object
- Jetmeter::CloseAccumulator
- Defined in:
- lib/jetmeter/close_accumulator.rb
Constant Summary collapse
- CLOSED_EVENT =
'closed'.freeze
Instance Attribute Summary collapse
-
#additive ⇒ Object
readonly
Returns the value of attribute additive.
Instance Method Summary collapse
-
#initialize(additive: true) ⇒ CloseAccumulator
constructor
A new instance of CloseAccumulator.
- #valid?(event, flow) ⇒ Boolean
Constructor Details
#initialize(additive: true) ⇒ CloseAccumulator
Returns a new instance of CloseAccumulator.
7 8 9 |
# File 'lib/jetmeter/close_accumulator.rb', line 7 def initialize(additive: true) @additive = additive end |
Instance Attribute Details
#additive ⇒ Object (readonly)
Returns the value of attribute additive.
5 6 7 |
# File 'lib/jetmeter/close_accumulator.rb', line 5 def additive @additive end |
Instance Method Details
#valid?(event, flow) ⇒ Boolean
11 12 13 14 15 |
# File 'lib/jetmeter/close_accumulator.rb', line 11 def valid?(event, flow) event.issue_event? && event.event == CLOSED_EVENT && closing_transition?(flow) end |