Class: Colombo::Regions
- Defined in:
- lib/colombo/regions.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Regions
constructor
A new instance of Regions.
Methods inherited from Container
#find, #method_missing, #run_find_by_attr
Constructor Details
#initialize(client) ⇒ Regions
Returns a new instance of Regions.
8 9 10 11 12 13 14 15 |
# File 'lib/colombo/regions.rb', line 8 def initialize(client) @client = client @client.request(:get, '/regions/', {}) do |response| response['regions'].each do |region| self[ region['id'].to_i ] = Region.new(@client, region) end end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Colombo::Container