Module: Copy::Operations::Create::ClassMethods

Defined in:
lib/copy/operations/create.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes) ⇒ Object

Creates a new object

Parameters:

  • attributes (Hash)

    The attributes of the created object



8
9
10
11
12
# File 'lib/copy/operations/create.rb', line 8

def create(attributes)
  session = attributes.delete(:session)
  response = Copy.request(:post, nil, api_collection_url(attributes), attributes, options_for_request(session: session))
  self.new(response)
end