Sha256: a53ae594f7d343872e1fe4d54ac52adcd810c8f06e4ab538cce7e369ff0075c3
Contents?: true
Size: 868 Bytes
Versions: 10
Compression:
Stored size: 868 Bytes
Contents
module RedboothRuby 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 = RedboothRuby.request(:put, nil, api_member_url(id, :updated), attributes, options_for_request(session: session) ) new(response.data) end end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems