Class: Skyscanner::RouteMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/movlog/routes.rb

Overview

Query parameters

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ RouteMeta

Returns a new instance of RouteMeta.



73
74
75
76
77
# 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

Instance Attribute Details

#currencyObject (readonly)

Returns the value of attribute currency.



69
70
71
# File 'lib/movlog/routes.rb', line 69

def currency
  @currency
end

#destinationObject (readonly)

Returns the value of attribute destination.



70
71
72
# File 'lib/movlog/routes.rb', line 70

def destination
  @destination
end

#inboundObject (readonly)

Returns the value of attribute inbound.



71
72
73
# File 'lib/movlog/routes.rb', line 71

def inbound
  @inbound
end

#localeObject (readonly)

Returns the value of attribute locale.



69
70
71
# File 'lib/movlog/routes.rb', line 69

def locale
  @locale
end

#marketObject (readonly)

Returns the value of attribute market.



69
70
71
# File 'lib/movlog/routes.rb', line 69

def market
  @market
end

#originObject (readonly)

Returns the value of attribute origin.



70
71
72
# File 'lib/movlog/routes.rb', line 70

def origin
  @origin
end

#outboundObject (readonly)

Returns the value of attribute outbound.



71
72
73
# File 'lib/movlog/routes.rb', line 71

def outbound
  @outbound
end

Instance Method Details

#to_hashObject



79
80
81
82
83
# 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