Class: Rome2rio::Agency

Inherits:
Object
  • Object
show all
Defined in:
lib/rome2rio/response/agency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def code
  @code
end

#iconOffsetObject (readonly)

Returns the value of attribute iconOffset.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def iconOffset
  @iconOffset
end

#iconPathObject (readonly)

Returns the value of attribute iconPath.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def iconPath
  @iconPath
end

#iconSizeObject (readonly)

Returns the value of attribute iconSize.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def iconSize
  @iconSize
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/rome2rio/response/agency.rb', line 3

def url
  @url
end