Module: Lab42::Core::StateMachine::Tools
Instance Method Summary collapse
Instance Method Details
#define_handler(handler, handler_block) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/lab42/core/state_machine/tools.rb', line 8 def define_handler handler, handler_block raise ArgumentError, "cannot provide handler and block" if handler_block && !handler.empty? raise ArgumentError, "must not provide more than one handler" if handler.size > 1 make_handler( handler.first || handler_block ) end |
#end_state_id ⇒ Object
4 5 6 |
# File 'lib/lab42/core/state_machine/tools.rb', line 4 def end_state_id @__end_state_id__ ||= "END_#{SecureRandom.hex}" end |