class Skyscanner::RouteMeta

Query parameters

Attributes

currency[R]
destination[R]
inbound[R]
locale[R]
market[R]
origin[R]
outbound[R]

Public Class Methods

new(data) click to toggle source
# File lib/movlog/routes.rb, line 73
def initialize(data)
  load_env_data(data['market'], data['currency'], data['locale'])
  load_place(data['origin'], data['destination'])
  load_date(data['outbound'], data['inbound'])
end

Public Instance Methods

to_hash() click to toggle source
# File lib/movlog/routes.rb, line 79
def to_hash
  { market: @market, currency: @currency, locale: @locale,
    origin: @origin, destination: @destination,
    outbound: @outbound, inbound: @inbound }
end

Private Instance Methods

load_date(outbound, inbound) click to toggle source
# File lib/movlog/routes.rb, line 98
def load_date(outbound, inbound)
  @outbound = outbound
  @inbound = inbound
end
load_env_data(market, currency, locale) click to toggle source
# File lib/movlog/routes.rb, line 87
def load_env_data(market, currency, locale)
  @market = market
  @currency = currency
  @locale = locale
end
load_place(origin, destination) click to toggle source
# File lib/movlog/routes.rb, line 93
def load_place(origin, destination)
  @origin = origin
  @destination = destination
end