Class: Oujoke::Workflow::Transition

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bp, options = {}) ⇒ Transition

Returns a new instance of Transition.



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

def initialize(bp,options = {})
  @from_state = options["from_state"]
  @to_state = options["to_state"]
  @on_raise = options["on_raise"]
  @name = options["name"]
  @params = options["params"]
  @business_process = bp
end

Instance Attribute Details

#from_stateObject

Returns the value of attribute from_state.



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

def from_state
  @from_state
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#on_raiseObject

Returns the value of attribute on_raise.



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

def on_raise
  @on_raise
end

#paramsObject

Returns the value of attribute params.



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

def params
  @params
end

#to_stateObject

Returns the value of attribute to_state.



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

def to_state
  @to_state
end

#workflowObject

Returns the value of attribute workflow.



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

def workflow
  @workflow
end

Instance Method Details

#performObject



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

def perform
  raise "Should be override to perform"
end