Method: CF::Line.destroy

Defined in:
lib/cf/line.rb

.destroy(title, options = {}) ⇒ Object

Deletes a line by passing it’s title

Usage Example:

line = CF::Line.new("line_title", "Survey")
CF::Line.destroy("line_title")


419
420
421
422
423
424
425
426
427
428
# File 'lib/cf/line.rb', line 419

def self.destroy(title, options={})
  forced = options[:forced]
  if forced
    resp = delete("/lines/#{CF.account_name}/#{title.downcase}.json", {:forced => forced})
  else
    resp = delete("/lines/#{CF.account_name}/#{title.downcase}.json")
  end
  @errors = resp['error']['message'] if resp['code'] != 200
  return resp
end