Class: Stop
- Inherits:
-
Object
- Object
- Stop
- Defined in:
- lib/pennride/stop.rb
Instance Attribute Summary collapse
-
#arrival_times(link = @link) ⇒ Object
Returns array of arrival times (Strings) for the Stop Note: untested as PennRide isn’t operating over winter break.
-
#id ⇒ Object
Returns the value of attribute id.
-
#link ⇒ Object
Returns the value of attribute link.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, link) ⇒ Stop
constructor
A new instance of Stop.
Constructor Details
#initialize(name, link) ⇒ Stop
Returns a new instance of Stop.
4 5 6 7 |
# File 'lib/pennride/stop.rb', line 4 def initialize(name, link) @name, @link = name, link @id = @link.split("/")[-1] end |
Instance Attribute Details
#arrival_times(link = @link) ⇒ Object
Returns array of arrival times (Strings) for the Stop Note: untested as PennRide isn’t operating over winter break
11 12 13 |
# File 'lib/pennride/stop.rb', line 11 def arrival_times @arrival_times end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/pennride/stop.rb', line 2 def id @id end |
#link ⇒ Object
Returns the value of attribute link.
2 3 4 |
# File 'lib/pennride/stop.rb', line 2 def link @link end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/pennride/stop.rb', line 2 def name @name end |