Class: AmtrakStations::Station

Inherits:
Object
  • Object
show all
Defined in:
lib/amtrak_stations/station.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def city
  @city
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def name
  @name
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def state
  @state
end

#station_codeObject (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

#timezoneObject (readonly)

Returns the value of attribute timezone.



3
4
5
# File 'lib/amtrak_stations/station.rb', line 3

def timezone
  @timezone
end