Class: Allorails::Region
- Inherits:
-
Base
- Object
- Allorails::Response::ApiResponse
- Allorails::Response::ApiMappingResponse
- Base
- Allorails::Region
- 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
Instance Method Summary collapse
-
#countries ⇒ Object
Provides the countries in the region @return (Array) region’s countries.
-
#name ⇒ Object
Provides the region name @return (string) region name.
Methods inherited from Base
Methods inherited from Allorails::Response::ApiMappingResponse
#_verify, attribute_reader, #initialize, node_reader
Methods inherited from Allorails::Response::ApiResponse
Constructor Details
This class inherits a constructor from Allorails::Base
Instance Method Details
#countries ⇒ Object
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 |
#name ⇒ Object
Provides the region name
@return (string) region name
62 |
# File 'lib/allorails/response/model.rb', line 62 attribute_reader :name |