Class: Airports::Airport
- Inherits:
-
Object
- Object
- Airports::Airport
- Defined in:
- lib/airports/airport.rb
Instance Attribute Summary collapse
-
#altitude ⇒ Object
readonly
Returns the value of attribute altitude.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#dst ⇒ Object
readonly
Returns the value of attribute dst.
-
#iata ⇒ Object
readonly
Returns the value of attribute iata.
-
#icao ⇒ Object
readonly
Returns the value of attribute icao.
-
#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.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
-
#tz_name ⇒ Object
readonly
Returns the value of attribute tz_name.
Instance Method Summary collapse
-
#initialize(name:, city:, country:, iata:, icao:, latitude:, longitude:, altitude:, timezone:, dst:, tz_name:) ⇒ Airport
constructor
A new instance of Airport.
Constructor Details
#initialize(name:, city:, country:, iata:, icao:, latitude:, longitude:, altitude:, timezone:, dst:, tz_name:) ⇒ Airport
Returns a new instance of Airport.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/airports/airport.rb', line 8 def initialize(name:, city:, country:, iata:, icao:, latitude:, longitude:, altitude:, timezone:, dst:, tz_name:) @name = name @city = city @country = country @iata = iata @icao = icao @latitude = latitude @longitude = longitude @altitude = altitude @timezone = timezone @dst = dst @tz_name = tz_name end |
Instance Attribute Details
#altitude ⇒ Object (readonly)
Returns the value of attribute altitude.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def altitude @altitude end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def country @country end |
#dst ⇒ Object (readonly)
Returns the value of attribute dst.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def dst @dst end |
#iata ⇒ Object (readonly)
Returns the value of attribute iata.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def iata @iata end |
#icao ⇒ Object (readonly)
Returns the value of attribute icao.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def icao @icao end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def longitude @longitude end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def name @name end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def timezone @timezone end |
#tz_name ⇒ Object (readonly)
Returns the value of attribute tz_name.
5 6 7 |
# File 'lib/airports/airport.rb', line 5 def tz_name @tz_name end |