Class: LcpRuby::Workflow::TransitionResult

Inherits:
Object
  • Object
show all
Defined in:
lib/lcp_ruby/workflow/transition_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success:, transition_name:, from_state:, to_state:, record:, deferred_events: []) ⇒ TransitionResult

Returns a new instance of TransitionResult.



6
7
8
9
10
11
12
13
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 6

def initialize(success:, transition_name:, from_state:, to_state:, record:, deferred_events: [])
  @success = success
  @transition_name = transition_name
  @from_state = from_state
  @to_state = to_state
  @record = record
  @deferred_events = deferred_events
end

Instance Attribute Details

#deferred_eventsObject (readonly)

Returns the value of attribute deferred_events.



4
5
6
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 4

def deferred_events
  @deferred_events
end

#from_stateObject (readonly)

Returns the value of attribute from_state.



4
5
6
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 4

def from_state
  @from_state
end

#recordObject (readonly)

Returns the value of attribute record.



4
5
6
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 4

def record
  @record
end

#to_stateObject (readonly)

Returns the value of attribute to_state.



4
5
6
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 4

def to_state
  @to_state
end

#transition_nameObject (readonly)

Returns the value of attribute transition_name.



4
5
6
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 4

def transition_name
  @transition_name
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/lcp_ruby/workflow/transition_result.rb', line 15

def success?
  @success == true
end