Class: AxiomusApi::RegionsResponse

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

Defined Under Namespace

Classes: City, Office, Region

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ RegionsResponse

Returns a new instance of RegionsResponse.



47
48
49
50
51
52
53
# File 'lib/axiomus_api/response/regions_response.rb', line 47

def initialize(xml)
  doc = Nokogiri::XML(xml)

  @regions = doc.xpath('response/region').map do |node|
    Region.new(node)
  end
end

Instance Attribute Details

#regionsObject

Returns the value of attribute regions.



45
46
47
# File 'lib/axiomus_api/response/regions_response.rb', line 45

def regions
  @regions
end