Class: AASM::Base
Overview
redefine the initialize method because it was was doing a very expensive (for Opal) class_eval with a string (instead of a block). While we are redefining this the unnecessary options have been removed.
Instance Attribute Summary collapse
-
#state_machine ⇒ Object
readonly
Returns the value of attribute state_machine.
Instance Method Summary collapse
-
#initialize(klass, options = {}, &block) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(klass, options = {}, &block) ⇒ Base
Returns a new instance of Base.
118 119 120 121 122 123 124 125 126 |
# File 'lib/opal/aasm.rb', line 118 def initialize(klass, ={}, &block) @klass = klass @state_machine = AASM::StateMachine[@klass] @options = # let's cry if the transition is invalid configure :whiny_transitions, true end |
Instance Attribute Details
#state_machine ⇒ Object (readonly)
Returns the value of attribute state_machine.
116 117 118 |
# File 'lib/opal/aasm.rb', line 116 def state_machine @state_machine end |