class Ellington::Attendant

Attributes

passenger_transitions[R]
station[R]

Public Class Methods

new(station) click to toggle source
# File lib/ellington/attendant.rb, line 6
def initialize(station)
  @station = station
  @passenger_transitions = []
end

Public Instance Methods

approve?() click to toggle source
# File lib/ellington/attendant.rb, line 15
def approve?
  passenger_transitions.length == 1 && 
    station.states.include?(passenger_transitions.first.new_state)
end
update(transition_info) click to toggle source
# File lib/ellington/attendant.rb, line 11
def update(transition_info)
  passenger_transitions << transition_info
end