lib/asynchro/state.rb
# Runs a particular state, or if the state is not specified, then :start
# by default.
Runs a particular state, or if the state is not specified, then :start
by default.
Runs a particular state or if the state is not specified then : start by default .
def run!(state = :start)
    procs = @states[state.to_sym]
    case (state)
    when :start
      procs = [ lambda { finish! } ] unless (procs)
    end
    if (procs)
      procs.each(&:call)
    else
      STDERR.puts "WARNING: No state #{state} defined."
    end
  end
def run! ( state = :start ) procs = @states [ state . to_sym ] case ( state ) when :start procs = [ lambda { finish! } ] unless ( procs ) end if ( procs ) procs . each ( & :call ) else STDERR . puts "WARNING: No state #{state} defined." end end
Runs a particular state, or if the state is not specified, then :start
by default.
Runs a particular state or if the state is not specified then : start by default .
state
<not_specific>