Class: Gmail::Thread
- Inherits:
-
APIResource
- Object
- GmailObject
- APIResource
- Gmail::Thread
- Includes:
- Base::Delete, Base::Get, Base::List, Base::Modify, Base::Trash
- Defined in:
- lib/gmail/thread.rb
Instance Method Summary collapse
Methods included from Base::Trash
Methods included from Base::Modify
#archive, #archive!, #mark_as_read, #mark_as_read!, #mark_as_unread, #mark_as_unread!, #modify, #modify!, #star, #star!, #unarchive, #unarchive!, #unstar, #unstar!
Methods included from Base::Get
Methods included from Base::Delete
Methods included from Base::List
Methods inherited from APIResource
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
Instance Method Details
#messages ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gmail/thread.rb', line 9 def if @values..is_a? Array if @values..first.is_a? Message @values. else @values. = Util.convert_to_gmail_object(to_hash[:messages], key="message") end else self.detailed! end end |
#sent_messages ⇒ Object
31 32 33 34 35 |
# File 'lib/gmail/thread.rb', line 31 def .select{|m| m.sent?} end |
#unread_messages ⇒ Object
24 25 26 27 28 |
# File 'lib/gmail/thread.rb', line 24 def .select{|m| m.unread?} end |