Class: AmtrakStations::Station
- Inherits:
-
Object
- Object
- AmtrakStations::Station
- Defined in:
- lib/amtrak_stations/station.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#station_code ⇒ Object
readonly
Returns the value of attribute station_code.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Instance Method Summary collapse
-
#initialize(name:, city:, state:, station_code:, latitude:, longitude:, timezone:) ⇒ Station
constructor
A new instance of Station.
Constructor Details
#initialize(name:, city:, state:, station_code:, latitude:, longitude:, timezone:) ⇒ Station
Returns a new instance of Station.
6 7 8 9 10 11 12 13 14 |
# File 'lib/amtrak_stations/station.rb', line 6 def initialize(name:, city:, state:, station_code:, latitude:, longitude:, timezone:) @name = name @city = city @state = state @station_code = station_code @latitude = latitude @longitude = longitude @timezone = timezone end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def city @city end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def longitude @longitude end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def state @state end |
#station_code ⇒ Object (readonly)
Returns the value of attribute station_code.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def station_code @station_code end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
3 4 5 |
# File 'lib/amtrak_stations/station.rb', line 3 def timezone @timezone end |