class Skyscanner::Route
Route
info
Attributes
flights[R]
meta[R]
Public Class Methods
find(meta)
click to toggle source
# File lib/movlog/route.rb, line 14 def self.find(meta) route_info = RouteInfo.find(meta) data = { meta: meta, flights: route_info.parse_flights } new(data) end
new(data)
click to toggle source
# File lib/movlog/route.rb, line 9 def initialize(data) @meta = RouteMeta.new(data[:meta]) @flights = data[:flights] end
Public Instance Methods
to_hash()
click to toggle source
# File lib/movlog/route.rb, line 23 def to_hash { meta: @meta.to_hash, flights: @flights.to_hash } end