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