Module: DHS::Record::Destroy::ClassMethods

Defined in:
lib/dhs/concerns/record/destroy.rb

Instance Method Summary collapse

Instance Method Details

#destroy(args, options = nil) ⇒ Object



11
12
13
14
15
# File 'lib/dhs/concerns/record/destroy.rb', line 11

def destroy(args, options = nil)
  options = {} if options.blank?
  params = args.respond_to?(:to_h) ? args : { id: args }
  request(options.merge(params: params, method: :delete))
end