Class: Hecks::Bluebook::ProcessManager

Inherits:
Object
  • Object
show all
Includes:
Behaviour::ProcessManager, IR
Defined in:
lib/hecks/bluebook/process_manager.rb

Constant Summary collapse

REFUSED =

The BLUEBOOK's name for this construct, asked the same way of a class that has crossed over and of an IR object that has not. Collapses into Construct when this one crosses. The trigger of a compensating leg. Not an event name — no aggregate announces that a leg the procedure dispatched was declined — so it lives here beside the thing it triggers rather than in the runtime that notices it. Declared in the language's Trigger vocabulary, which spec/vocabulary_conformance_spec holds to this constant.

Hecks::Vocabulary.fetch("Trigger").first

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Behaviour::ProcessManager

#correlation_head, #declares_state?, #handler_for, #hecks_name, #saga, #saga?

Methods included from IR

extended, included

Constructor Details

#initialize(name:, correlates_by: nil, starts_on: nil, ends_on: nil, states: [], handlers: []) ⇒ ProcessManager

Returns a new instance of ProcessManager.



75
76
77
78
79
80
81
82
83
# File 'lib/hecks/bluebook/process_manager.rb', line 75

def initialize(name:, correlates_by: nil, starts_on: nil, ends_on: nil,
               states: [], handlers: [])
  @name          = name.to_s
  @correlates_by = correlates_by
  @starts_on     = starts_on
  @ends_on       = ends_on
  @states        = states
  @handlers      = handlers
end

Instance Attribute Details

#correlates_byObject (readonly)

Returns the value of attribute correlates_by.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def correlates_by
  @correlates_by
end

#ends_onObject (readonly)

Returns the value of attribute ends_on.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def ends_on
  @ends_on
end

#handlersObject (readonly)

Returns the value of attribute handlers.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def handlers
  @handlers
end

#nameObject (readonly)

Returns the value of attribute name.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def name
  @name
end

#starts_onObject (readonly)

Returns the value of attribute starts_on.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def starts_on
  @starts_on
end

#statesObject (readonly)

Returns the value of attribute states.



73
74
75
# File 'lib/hecks/bluebook/process_manager.rb', line 73

def states
  @states
end