Class: AxiomusApi::RegionsResponse::City

Inherits:
Object
  • Object
show all
Defined in:
lib/axiomus_api/response/regions_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ City

Returns a new instance of City.



8
9
10
11
# File 'lib/axiomus_api/response/regions_response.rb', line 8

def initialize(node)
  @code = node.xpath('@city_code').text.to_i
  @name = node.text
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



5
6
7
# File 'lib/axiomus_api/response/regions_response.rb', line 5

def code
  @code
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/axiomus_api/response/regions_response.rb', line 6

def name
  @name
end