Sha256: 95a0e18ceca68c6c146fab763787a054d9d1203865c9a0d8e06d38559851cb0f
Contents?: true
Size: 541 Bytes
Versions: 2
Compression:
Stored size: 541 Bytes
Contents
module Copy module Operations module Create module ClassMethods # Creates a new object # # @param [Hash] attributes The attributes of the created object 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 end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
copy-ruby-0.0.2 | lib/copy/operations/create.rb |
copy-ruby-0.0.1 | lib/copy/operations/create.rb |