Class: RoutesBetweenAirportsResults
- Inherits:
-
Object
- Object
- RoutesBetweenAirportsResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#routesBetweenAirportsResult ⇒ Object
Returns the value of attribute routesBetweenAirportsResult.
Instance Method Summary collapse
-
#initialize(routesBetweenAirportsResult = nil) ⇒ RoutesBetweenAirportsResults
constructor
A new instance of RoutesBetweenAirportsResults.
Constructor Details
#initialize(routesBetweenAirportsResult = nil) ⇒ RoutesBetweenAirportsResults
Returns a new instance of RoutesBetweenAirportsResults.
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 |
# File 'lib/FlightXML2REST.rb', line 2058 def initialize(routesBetweenAirportsResult = nil) begin rawRoutesBetweenAirportsResult = JSON.parse(routesBetweenAirportsResult) routesBetweenAirportsResult = rawRoutesBetweenAirportsResult['RoutesBetweenAirportsResult'] @routesBetweenAirportsResult = ArrayOfRoutesBetweenAirportsStruct.new() routesBetweenAirportsResult['data'].each do |route| @routesBetweenAirportsResult.data << RoutesBetweenAirportsStruct.new(route['count'], route['filedAltitude'], route['route'] ) end rescue raise FlightAwareError.new(rawRoutesBetwenAirportsResult['error']).error end end |
Instance Attribute Details
#routesBetweenAirportsResult ⇒ Object
Returns the value of attribute routesBetweenAirportsResult.
2057 2058 2059 |
# File 'lib/FlightXML2REST.rb', line 2057 def routesBetweenAirportsResult @routesBetweenAirportsResult end |