Module: StateFu
- Defined in:
- lib/event.rb,
lib/hooks.rb,
lib/lathe.rb,
lib/state.rb,
lib/binding.rb,
lib/machine.rb,
lib/sprocket.rb,
lib/state-fu.rb,
lib/interface.rb,
lib/transition.rb,
lib/executioner.rb,
lib/persistence.rb,
lib/method_factory.rb,
lib/support/arrays.rb,
lib/support/logger.rb,
lib/support/plotter.rb,
lib/persistence/base.rb,
lib/transition_query.rb,
lib/support/applicable.rb,
lib/support/exceptions.rb,
lib/support/methodical.rb,
lib/persistence/relaxdb.rb,
lib/persistence/session.rb,
lib/persistence/attribute.rb,
lib/persistence/active_record.rb
Defined Under Namespace
Modules: Applicable, ArrayWithSymbolAccessor, EventArray, HelperArray, Hooks, Interface, MessageArray, Methodical, ModuleRefArray, OrderedHash, Persistence, StateArray, ToolArray, TransitionArgsArray Classes: Binding, Error, Event, Executioner, IllegalTransition, InvalidStateName, Lathe, Logger, Machine, MagicMethodError, MethodFactory, Plotter, RequirementError, Sprocket, State, Transition, TransitionAlreadyFired, TransitionError, TransitionHalted, TransitionNotFound, TransitionQuery, UnknownTarget
Constant Summary collapse
- DEFAULT =
:default
- DEFAULT_FIELD =
:state_fu_field
Class Method Summary collapse
-
.get_effective_arity ⇒ Object
There’s a bug in ruby 1.8.x where lambda {}.arity == -1 instead of 0 To get around this, turn it into a proc if conditions are dangerous.
- .included(klass) ⇒ Object
Class Method Details
.get_effective_arity ⇒ Object
There’s a bug in ruby 1.8.x where lambda {}.arity == -1 instead of 0 To get around this, turn it into a proc if conditions are dangerous.
9 10 11 12 13 14 15 |
# File 'lib/executioner.rb', line 9 def self.get_effective_arity if RUBY_VERSION[0,3] == "1.8" && proc.arity == -1 proc.to_proc.arity else proc.arity end end |
.included(klass) ⇒ Object
52 53 54 55 56 |
# File 'lib/state-fu.rb', line 52 def self.included( klass ) klass.extend( Interface::ClassMethods ) klass.send( :include, Interface::InstanceMethods ) klass.extend( Interface::Aliases ) end |