Class: RoadToRubykaigi::SignalInterpreter::Walk

Inherits:
Data
  • Object
show all
Defined in:
lib/road_to_rubykaigi/signal_interpreter.rb

Overview

continuation briefly absent; next event -> WALKING (same direction), timeout -> STOPPED

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction

Returns:

  • (Object)

    the current value of direction



30
31
32
# File 'lib/road_to_rubykaigi/signal_interpreter.rb', line 30

def direction
  @direction
end

#speed_ratioObject (readonly)

Returns the value of attribute speed_ratio

Returns:

  • (Object)

    the current value of speed_ratio



30
31
32
# File 'lib/road_to_rubykaigi/signal_interpreter.rb', line 30

def speed_ratio
  @speed_ratio
end

Instance Method Details

#right?Boolean

Returns:

  • (Boolean)


31
# File 'lib/road_to_rubykaigi/signal_interpreter.rb', line 31

def right? = direction == :right