Sha256: 53997225466d239efaf1905b0c331a3e5314427bebcae4374c889966897ef721
Contents?: true
Size: 640 Bytes
Versions: 2
Compression:
Stored size: 640 Bytes
Contents
module Copy module Operations module Update module ClassMethods # Updates a object # @param [Integer] id The id of the object that should be updated # @param [Hash] attributes The attributes that should be updated def update(attributes={}) id = attributes.delete(:id) session = attributes.delete(:session) response = Copy.request(:put, nil, api_member_url(id, :updated), 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/update.rb |
copy-ruby-0.0.1 | lib/copy/operations/update.rb |