Class: Airports::Airport

Inherits:
Object
  • Object
show all
Defined in:
lib/airports/airport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#altitudeObject (readonly)

Returns the value of attribute altitude.



5
6
7
# File 'lib/airports/airport.rb', line 5

def altitude
  @altitude
end

#cityObject (readonly)

Returns the value of attribute city.



5
6
7
# File 'lib/airports/airport.rb', line 5

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



5
6
7
# File 'lib/airports/airport.rb', line 5

def country
  @country
end

#dstObject (readonly)

Returns the value of attribute dst.



5
6
7
# File 'lib/airports/airport.rb', line 5

def dst
  @dst
end

#iataObject (readonly)

Returns the value of attribute iata.



5
6
7
# File 'lib/airports/airport.rb', line 5

def iata
  @iata
end

#icaoObject (readonly)

Returns the value of attribute icao.



5
6
7
# File 'lib/airports/airport.rb', line 5

def icao
  @icao
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



5
6
7
# File 'lib/airports/airport.rb', line 5

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



5
6
7
# File 'lib/airports/airport.rb', line 5

def longitude
  @longitude
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/airports/airport.rb', line 5

def name
  @name
end

#timezoneObject (readonly)

Returns the value of attribute timezone.



5
6
7
# File 'lib/airports/airport.rb', line 5

def timezone
  @timezone
end

#tz_nameObject (readonly)

Returns the value of attribute tz_name.



5
6
7
# File 'lib/airports/airport.rb', line 5

def tz_name
  @tz_name
end