Class: Allorails::Region

Inherits:
Base show all
Defined in:
lib/allorails/response/model.rb

Overview

Class providing object mapping of a region item

Instance Attribute Summary

Attributes inherited from Allorails::Response::ApiMappingResponse

#xml

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods inherited from Allorails::Response::ApiMappingResponse

#_verify, attribute_reader, #initialize, node_reader

Methods inherited from Allorails::Response::ApiResponse

#_verify, #initialize

Constructor Details

This class inherits a constructor from Allorails::Base

Instance Method Details

#countriesObject

Provides the countries in the region

@return (Array) region's countries


66
67
68
# File 'lib/allorails/response/model.rb', line 66

def countries
  xml.css('country').map{|c| Allorails::Country.new(c)}
end

#nameObject

Provides the region name

@return (string) region name


62
# File 'lib/allorails/response/model.rb', line 62

attribute_reader :name