Class: Jirafe::Resource::Resources

Inherits:
JirafeResource show all
Defined in:
lib/jirafe/resource/resources.rb

Class Method Summary collapse

Methods inherited from JirafeResource

create, #identifier, list, parent, #parent, #parent=, parent_path, #parent_resource_url, path, resource_url, #resource_url, retrieve, update

Methods included from Model

#attributes, #attributes_for_change, #create, included, #initialize, #reinitialize, #update

Methods included from Jirafe::ResponseParser

included

Class Method Details

.sync(app_id, sites, users) ⇒ Object



12
13
14
15
16
# File 'lib/jirafe/resource/resources.rb', line 12

def sync(app_id, sites, users)
  resource = self.new(:sites => array_to_hash(sites), :users => array_to_hash(users))
  resource.parent = Application.new(:identifier => app_id)
  resource.create
end