Sha256: c4b8c0d6cb62dd8fd6c3dadedd4f18df1ec0accd516660392a1540642ff27495

Contents?: true

Size: 627 Bytes

Versions: 25

Compression:

Stored size: 627 Bytes

Contents

# frozen_string_literal: true

module ChartMogul
  module API
    module Actions
      module Destroy
        def self.included(base)
          base.extend ClassMethods
        end

        def destroy!
          handling_errors do
            connection.delete("#{resource_path.apply(instance_attributes)}/#{uuid}")
          end
          true
        end

        module ClassMethods
          def destroy!(options = {})
            handling_errors do
              connection.delete("#{resource_path.apply(options)}/#{options[:uuid]}")
            end
            true
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
chartmogul-ruby-4.4.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-4.3.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-4.2.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-4.1.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-4.0.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.3.1 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.3.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.2.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.1.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.0.2 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-3.0.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-2.9.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-2.1.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-2.0.0 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.7.3 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.7.2 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.7.1 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.6.9 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.6.8 lib/chartmogul/api/actions/destroy.rb
chartmogul-ruby-1.6.7 lib/chartmogul/api/actions/destroy.rb