module Stateful::ClassMethods
Public Instance Methods
final_state(*state_names)
click to toggle source
# File lib/Stateful/ClassMethods.rb, line 27 def final_state(*state_names) stateful_states.final_state(*state_names) end
final_state?()
click to toggle source
predicate methods
# File lib/Stateful/ClassMethods.rb, line 39 def final_state? !final_states.empty? end
Also aliased as: has_final_state?
final_states(*state_names)
click to toggle source
# File lib/Stateful/ClassMethods.rb, line 31 def final_states(*state_names) stateful_states.final_states(*state_names) end
initial_state(state_name = nil, options = {}, &block)
click to toggle source
# File lib/Stateful/ClassMethods.rb, line 19 def initial_state(state_name = nil, options = {}, &block) stateful_states.initial_state(state_name, options, &block) end
state(state_name, options = {}, &block)
click to toggle source
# File lib/Stateful/ClassMethods.rb, line 23 def state(state_name, options = {}, &block) stateful_states.state(state_name, options, &block) end
stateful(options = {}, &block)
click to toggle source
start DSL
# File lib/Stateful/ClassMethods.rb, line 15 def stateful(options = {}, &block) stateful_states.stateful(options, &block) end
stateful_states()
click to toggle source
# File lib/Stateful/ClassMethods.rb, line 9 def stateful_states @stateful_states ||= Stateful::States.new(self) end