class

Flight

Inherits JSON::Serializable < Reference < Object

Constructors

new(flight_number : String, date : String, user : String = "anonymous")
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

all(limit = 100, offset = 0)
Source
by_user(user : String, limit = 100)
Source
count
Source
count_by_user(user : String)
Source
find(id : Int64)
Source
longest_flights
Source
search(flight_number : String, date : String)
Source
shortest_flights
Source
stats_for_user(user : String)
Source
top_aircraft_types
Source
top_airlines
Source
top_airports
Source
top_routes
Source
total_distance
Source

Instance methods

aircraft_type
Source
aircraft_type=(aircraft_type : String | Nil)
Source
data
Source
data=(data : JSON::Any | Nil)
Source
date
Source
date=(date : String)
Source
destination
Source
destination=(destination : String | Nil)
Source
distance_km
Source
distance_km=(distance_km : Int32 | Nil)
Source
flight_number
Source
flight_number=(flight_number : String)
Source
id=(id : Int64 | Nil)
Source
origin
Source
origin=(origin : String | Nil)
Source
save
Source
submitted_at
Source
submitted_at=(submitted_at : String | Nil)
Source
user
Source
user=(user : String)
Source