Class: Jetmeter::OpenAccumulator

Inherits:
Object
  • Object
show all
Defined in:
lib/jetmeter/open_accumulator.rb

Constant Summary collapse

OPEN_STATE =
'open'.freeze

Instance Method Summary collapse

Instance Method Details

#additiveObject



11
12
13
# File 'lib/jetmeter/open_accumulator.rb', line 11

def additive
  true
end

#valid?(resource, flow) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/jetmeter/open_accumulator.rb', line 5

def valid?(resource, flow)
  resource.issue? &&
    opening_transition?(flow) &&
    open_or_worked?(resource)
end