Class: Skyscanner::Place
- Inherits:
-
Object
- Object
- Skyscanner::Place
- Defined in:
- lib/movlog/route.rb
Overview
Place info
Instance Attribute Summary collapse
-
#city_name ⇒ Object
readonly
Returns the value of attribute city_name.
-
#country_name ⇒ Object
readonly
Returns the value of attribute country_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Place
constructor
A new instance of Place.
Constructor Details
#initialize(data) ⇒ Place
Returns a new instance of Place.
45 46 47 48 49 50 |
# File 'lib/movlog/route.rb', line 45 def initialize(data) @name = data['Name'] @city_name = data['CityName'] @country_name = data['CountryName'] @type = data['Type'] end |
Instance Attribute Details
#city_name ⇒ Object (readonly)
Returns the value of attribute city_name.
42 43 44 |
# File 'lib/movlog/route.rb', line 42 def city_name @city_name end |
#country_name ⇒ Object (readonly)
Returns the value of attribute country_name.
42 43 44 |
# File 'lib/movlog/route.rb', line 42 def country_name @country_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
42 43 44 |
# File 'lib/movlog/route.rb', line 42 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
43 44 45 |
# File 'lib/movlog/route.rb', line 43 def type @type end |
Class Method Details
.find(data) ⇒ Object
52 53 54 |
# File 'lib/movlog/route.rb', line 52 def self.find(data) new(data) end |