Class: Skyscanner::RouteMeta
- Inherits:
-
Object
- Object
- Skyscanner::RouteMeta
- Defined in:
- lib/movlog/routes.rb
Overview
Query parameters
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#inbound ⇒ Object
readonly
Returns the value of attribute inbound.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#market ⇒ Object
readonly
Returns the value of attribute market.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#outbound ⇒ Object
readonly
Returns the value of attribute outbound.
Instance Method Summary collapse
-
#initialize(data) ⇒ RouteMeta
constructor
A new instance of RouteMeta.
- #to_hash ⇒ Object
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
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
69 70 71 |
# File 'lib/movlog/routes.rb', line 69 def currency @currency end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
70 71 72 |
# File 'lib/movlog/routes.rb', line 70 def destination @destination end |
#inbound ⇒ Object (readonly)
Returns the value of attribute inbound.
71 72 73 |
# File 'lib/movlog/routes.rb', line 71 def inbound @inbound end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
69 70 71 |
# File 'lib/movlog/routes.rb', line 69 def locale @locale end |
#market ⇒ Object (readonly)
Returns the value of attribute market.
69 70 71 |
# File 'lib/movlog/routes.rb', line 69 def market @market end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
70 71 72 |
# File 'lib/movlog/routes.rb', line 70 def origin @origin end |
#outbound ⇒ Object (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_hash ⇒ Object
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 |