Class: Gmail::APIResource

Inherits:
GmailObject show all
Defined in:
lib/gmail/api_resource.rb

Direct Known Subclasses

Draft, Label, Message, Thread

Class Method Summary collapse

Methods inherited from GmailObject

#[], #[]=, #as_json, #detailed, #initialize, #inspect, #refresh, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Gmail::GmailObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gmail::GmailObject

Class Method Details

.base_methodObject



7
8
9
# File 'lib/gmail/api_resource.rb', line 7

def self.base_method
  Gmail.service.users.send("#{class_name.downcase}s")
end

.class_nameObject



3
4
5
# File 'lib/gmail/api_resource.rb', line 3

def self.class_name
  self.name.split('::')[-1]
end