Class: Rome2rio::Agency
- Inherits:
-
Object
- Object
- Rome2rio::Agency
- Defined in:
- lib/rome2rio/response/agency.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) ⇒ Agency
constructor
A new instance of Agency.
Constructor Details
#initialize(json) ⇒ Agency
Returns a new instance of Agency.
4 5 6 7 8 9 10 11 |
# File 'lib/rome2rio/response/agency.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/agency.rb', line 3 def code @code end |
#iconOffset ⇒ Object (readonly)
Returns the value of attribute iconOffset.
3 4 5 |
# File 'lib/rome2rio/response/agency.rb', line 3 def iconOffset @iconOffset end |
#iconPath ⇒ Object (readonly)
Returns the value of attribute iconPath.
3 4 5 |
# File 'lib/rome2rio/response/agency.rb', line 3 def iconPath @iconPath end |
#iconSize ⇒ Object (readonly)
Returns the value of attribute iconSize.
3 4 5 |
# File 'lib/rome2rio/response/agency.rb', line 3 def iconSize @iconSize end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rome2rio/response/agency.rb', line 3 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/rome2rio/response/agency.rb', line 3 def url @url end |