Class: Rome2rio::Airline
- Inherits:
-
Object
- Object
- Rome2rio::Airline
- Defined in:
- lib/rome2rio/response/airline.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#iconOffset ⇒ Object
readonly
Returns the value of attribute iconOffset.
-
#iconPath ⇒ Object
readonly
Returns the value of attribute iconPath.
-
#iconSize ⇒ Object
readonly
Returns the value of attribute iconSize.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ Airline
constructor
A new instance of Airline.
Constructor Details
#initialize(json) ⇒ Airline
Returns a new instance of Airline.
4 5 6 7 8 9 10 11 |
# File 'lib/rome2rio/response/airline.rb', line 4 def initialize(json) @code = json["code"] @name = json["name"] @url = json["url"] @iconPath = json["iconPath"] @iconSize = Size.parse(json["iconSize"]) @iconOffset = Offset.parse(json["iconOffset"]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def code @code end |
#iconOffset ⇒ Object (readonly)
Returns the value of attribute iconOffset.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def iconOffset @iconOffset end |
#iconPath ⇒ Object (readonly)
Returns the value of attribute iconPath.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def iconPath @iconPath end |
#iconSize ⇒ Object (readonly)
Returns the value of attribute iconSize.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def iconSize @iconSize end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/rome2rio/response/airline.rb', line 3 def url @url end |