Class: RouteNGNClient::RouteTable

Inherits:
RemoteModel show all
Defined in:
lib/routengn_client/models/route_table.rb

Constant Summary

Constants inherited from RemoteModel

RouteNGNClient::RemoteModel::DEFAULT_RESOURCE_ATTRIBUTES

Instance Attribute Summary

Attributes included from RouteNGNClient::RemoteModel::ClassMethods

#resource_attributes

Attributes inherited from Model

#attributes, #request_account_id

Attributes included from Model::ClassMethods

#children, #only_children, #parents

Instance Method Summary collapse

Methods included from RouteNGNClient::RemoteModel::ClassMethods

#all, #collection_name, #create!, #find, #index_method, #path_base, #path_ext, #set_resource_attributes, #where

Methods inherited from Model

#initialize, #to_hash, #to_json, #to_log

Methods included from Model::ClassMethods

#belongs_to, #from_hash, #from_json, #has_many, #has_one

Methods included from Logging

#init_logger, #logger

Constructor Details

This class inherits a constructor from RouteNGNClient::Model

Instance Method Details

#route_containers(params = {}, options = {}, &callback) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/routengn_client/models/route_table.rb', line 15

def route_containers(params = {}, options = {}, &callback)      
  options[:klass] ||= RouteContainer
  options[:account_id] ||= self.

  models = []

  response = Request.new(self.class.resource_attributes.merge(:collection_name => 'route_containers'), :get, [self.class.path_base, self.attributes.id, 'route_containers'], self.class.path_ext, params, options).execute(RouteNGNClient.connection)
  models = response.to_models

  callback.call(models) if callback

  models
end