Sha256: ace7f7d2044b74efa2122772d7d26563d0851f8bcbdeb77c9bc2c1944c1bf33a

Contents?: true

Size: 781 Bytes

Versions: 10

Compression:

Stored size: 781 Bytes

Contents

module RedboothRuby
  module Operations
    module Delete
      module ClassMethods
        # Deletes the given object
        #
        # @param attributes [Hash] hash of given attributes passed to the delete method
        # @return [Boolean]
        def delete(attributes = {})
          id = attributes.delete(:id)
          response = RedboothRuby.request(:delete,
                                          nil,
                                          api_member_url(id, :delete),
                                          {},
                                          options_for_request(attributes)
                                         )
          true
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
redbooth-ruby-0.2.3 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.2.2 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.2.1 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.2.0 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.1.4 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.1.3 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.1.1 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.1.0 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.0.5 lib/redbooth-ruby/operations/delete.rb
redbooth-ruby-0.0.4 lib/redbooth-ruby/operations/delete.rb