Class: Rome2rio::Airline

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#iconOffsetObject (readonly)

Returns the value of attribute iconOffset.



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

def iconOffset
  @iconOffset
end

#iconPathObject (readonly)

Returns the value of attribute iconPath.



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

def iconPath
  @iconPath
end

#iconSizeObject (readonly)

Returns the value of attribute iconSize.



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

def iconSize
  @iconSize
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end