Class: RoutesBetweenAirportsExResults
- Inherits:
-
Object
- Object
- RoutesBetweenAirportsExResults
- Defined in:
- lib/FlightXML2REST.rb
Instance Attribute Summary collapse
-
#routesBetweenAirportsExResult ⇒ Object
Returns the value of attribute routesBetweenAirportsExResult.
Instance Method Summary collapse
-
#initialize(routesBetweenAirportsExResult = nil) ⇒ RoutesBetweenAirportsExResults
constructor
A new instance of RoutesBetweenAirportsExResults.
Constructor Details
#initialize(routesBetweenAirportsExResult = nil) ⇒ RoutesBetweenAirportsExResults
Returns a new instance of RoutesBetweenAirportsExResults.
2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 |
# File 'lib/FlightXML2REST.rb', line 2112 def initialize(routesBetweenAirportsExResult = nil) begin rawRoutesBetweenAirportsExResult = JSON.parse(routesBetwenAirportsExResult) routesBetweenAirportsExResult = rawRoutesBetweenAirportsExResult['RoutesBetweenAirportsExResult'] @routesBetweenAirportsExResult = ArrayOfRoutesBetweenAirportsExStruct.new([], routesBetweenAirportsExResult['next_offset']) routesBetweenAirportsExResult['data'].each do |route| @routesBetweenAirportsExResult.data << RoutesBetweenAirportsExStruct.new(route['count'], route['filedAltitude_max'], route['filedAltitude_min'], route['last_departuretime'], route['route'] ) end rescue raise FlightAwareError.new(rawRoutesBetweenAirportsExResult['error']).error end end |
Instance Attribute Details
#routesBetweenAirportsExResult ⇒ Object
Returns the value of attribute routesBetweenAirportsExResult.
2111 2112 2113 |
# File 'lib/FlightXML2REST.rb', line 2111 def routesBetweenAirportsExResult @routesBetweenAirportsExResult end |