class Ellington::StationList

Attributes

inner_list[R]
line_class[R]

Public Class Methods

new(line_class) click to toggle source
Calls superclass method
# File lib/ellington/station_list.rb, line 7
def initialize(line_class)
  @line_class = line_class
  @inner_list = UniqueTypeArray.new
  super @inner_list
end

Public Instance Methods

<<(station)
Alias for: push
add(station) click to toggle source
# File lib/ellington/station_list.rb, line 20
def add(station)
  push(station).last
end
find_by_type(type) click to toggle source
# File lib/ellington/station_list.rb, line 24
def find_by_type(type)
  find { |entry| entry.is_a? type }
end
push(station) click to toggle source
# File lib/ellington/station_list.rb, line 13
def push(station)
  value = inner_list << station
  station.line_class = line_class
  value
end
Also aliased as: <<