Module: Gmail::Base::Trash
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
26 27 28 |
# File 'lib/gmail/base/trash.rb', line 26 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#trash(opts = {}) ⇒ Object
4 5 6 7 |
# File 'lib/gmail/base/trash.rb', line 4 def trash(opts={}) response = Gmail.request(self.class.base_method.send("trash"),{id: id}) Util.convert_to_gmail_object(response, self.class.class_name.downcase) end |
#untrash(opts = {}) ⇒ Object
9 10 11 12 |
# File 'lib/gmail/base/trash.rb', line 9 def untrash(opts={}) response = Gmail.request(self.class.base_method.send("untrash"),{id: id}) Util.convert_to_gmail_object(response, self.class.class_name.downcase) end |