class method
self.new
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
self.new(klass, name, options = {}, &block)
No documentation comment.
Parameters
-
klassreq -
namereq -
optionsopt = {} -
blockblock
Source
# File activemodel/lib/active_model/state_machine/machine.rb, line 7
def initialize(klass, name, options = {}, &block)
@klass, @name, @states, @state_index, @events = klass, name, [], {}, {}
update(options, &block)
end
Defined in activemodel/lib/active_model/state_machine/machine.rb line 7
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::StateMachine::Machine