Class: Ellington::StationList
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Ellington::StationList
- Defined in:
- lib/ellington/station_list.rb
Instance Attribute Summary collapse
-
#line_class ⇒ Object
readonly
Returns the value of attribute line_class.
Instance Method Summary collapse
-
#initialize(line_class) ⇒ StationList
constructor
A new instance of StationList.
- #push(station) ⇒ Object (also: #<<)
Constructor Details
#initialize(line_class) ⇒ StationList
Returns a new instance of StationList.
7 8 9 10 11 |
# File 'lib/ellington/station_list.rb', line 7 def initialize(line_class) @line_class = line_class @inner_list = UniqueTypeArray.new super @inner_list end |
Instance Attribute Details
#line_class ⇒ Object (readonly)
Returns the value of attribute line_class.
5 6 7 |
# File 'lib/ellington/station_list.rb', line 5 def line_class @line_class end |
Instance Method Details
#push(station) ⇒ Object Also known as: <<
13 14 15 16 17 |
# File 'lib/ellington/station_list.rb', line 13 def push(station) value = inner_list << station station.line_class = line_class value end |