Class: Rome2rio::Stop

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Stop

Returns a new instance of Stop.



4
5
6
7
8
9
# File 'lib/rome2rio/response/stop.rb', line 4

def initialize(json)
  @kind = json["kind"]
  @name = json["name"]
  @pos = Position.parse(json["pos"])
  @code = json["code"]
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#kindObject (readonly)

Returns the value of attribute kind.



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

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#posObject (readonly)

Returns the value of attribute pos.



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

def pos
  @pos
end