Class: JetBluePlaneTracker::Arrival

Inherits:
Travel
  • Object
show all
Defined in:
lib/jetblue_plane_tracker/arrival.rb

Instance Attribute Summary

Attributes inherited from Travel

#actual_takeoff, #airport, #gate, #scheduled_takeoff, #temperature, #terminal

Class Method Summary collapse

Methods inherited from Travel

#initialize, #to_json, #to_s, #type

Constructor Details

This class inherits a constructor from JetBluePlaneTracker::Travel

Class Method Details

.parse(leg) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/jetblue_plane_tracker/arrival.rb', line 6

def parse(leg)
	airport 			= 	leg['destination']
	scheduled_takeoff 	= 	leg['scheduledArrival']
	actual_takeoff 		=	leg['actualArrival']
	terminal 			= 	leg['destinationTerminal']
	gate 				=	leg['destinationGate']
	temperature 		= 	leg['destinationTemperature']

	new(airport, scheduled_takeoff, actual_takeoff, terminal, gate, temperature)
end