Module: Gmail::Base::Delete

Included in:
Draft, Label, Message, Thread
Defined in:
lib/gmail/base/delete.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
# File 'lib/gmail/base/delete.rb', line 24

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

Instance Method Details

#delete(opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/gmail/base/delete.rb', line 4

def delete(opts={})
  response = Gmail.request(self.class.base_method.send("delete"),{id: id})
  if response == ""
    true
  else
    false
  end
end