Class: Zm::Client::Message::FlagsCollection
- Inherits:
-
Object
- Object
- Zm::Client::Message::FlagsCollection
- Defined in:
- lib/zm/client/message/message_flags.rb
Instance Method Summary collapse
- #all ⇒ Object
- #all! ⇒ Object
- #attachment? ⇒ Boolean
- #calendar_invite? ⇒ Boolean
- #draft? ⇒ Boolean
- #flag! ⇒ Object
- #flagged? ⇒ Boolean
- #forwarded? ⇒ Boolean
- #imap_deleted? ⇒ Boolean
-
#initialize(parent) ⇒ FlagsCollection
constructor
A new instance of FlagsCollection.
- #low_priority? ⇒ Boolean
- #notification? ⇒ Boolean
- #priority? ⇒ Boolean
- #read! ⇒ Object
- #replied ⇒ Object
- #sent_by_me? ⇒ Boolean
- #unflag! ⇒ Object
-
#unread! ⇒ Object
actions.
-
#unread? ⇒ Boolean
properties.
- #urgent? ⇒ Boolean
Constructor Details
#initialize(parent) ⇒ FlagsCollection
Returns a new instance of FlagsCollection.
8 9 10 |
# File 'lib/zm/client/message/message_flags.rb', line 8 def initialize(parent) @parent = parent end |
Instance Method Details
#all ⇒ Object
12 13 14 |
# File 'lib/zm/client/message/message_flags.rb', line 12 def all @all || all! end |
#all! ⇒ Object
16 17 18 |
# File 'lib/zm/client/message/message_flags.rb', line 16 def all! @parent.f.to_s.chars end |
#attachment? ⇒ Boolean
30 31 32 |
# File 'lib/zm/client/message/message_flags.rb', line 30 def all.include?('a') end |
#calendar_invite? ⇒ Boolean
46 47 48 |
# File 'lib/zm/client/message/message_flags.rb', line 46 def calendar_invite? all.include?('v') end |
#draft? ⇒ Boolean
50 51 52 |
# File 'lib/zm/client/message/message_flags.rb', line 50 def draft? all.include?('d') end |
#flag! ⇒ Object
91 92 93 94 |
# File 'lib/zm/client/message/message_flags.rb', line 91 def flag! attrs = { op: 'flag', id: @parent.id } @parent.sacc.invoke(build(attrs)) end |
#flagged? ⇒ Boolean
26 27 28 |
# File 'lib/zm/client/message/message_flags.rb', line 26 def flagged? all.include?('f') end |
#forwarded? ⇒ Boolean
42 43 44 |
# File 'lib/zm/client/message/message_flags.rb', line 42 def forwarded? all.include?('w') end |
#imap_deleted? ⇒ Boolean
54 55 56 |
# File 'lib/zm/client/message/message_flags.rb', line 54 def imap_deleted? all.include?('x') end |
#low_priority? ⇒ Boolean
66 67 68 |
# File 'lib/zm/client/message/message_flags.rb', line 66 def low_priority? all.include?('?') end |
#notification? ⇒ Boolean
58 59 60 |
# File 'lib/zm/client/message/message_flags.rb', line 58 def notification? all.include?('n') end |
#priority? ⇒ Boolean
70 71 72 |
# File 'lib/zm/client/message/message_flags.rb', line 70 def priority? all.include?('+') end |
#read! ⇒ Object
81 82 83 84 |
# File 'lib/zm/client/message/message_flags.rb', line 81 def read! attrs = { op: 'read', id: @parent.id } @parent.sacc.invoke(build(attrs)) end |
#replied ⇒ Object
34 35 36 |
# File 'lib/zm/client/message/message_flags.rb', line 34 def replied all.include?('r') end |
#sent_by_me? ⇒ Boolean
38 39 40 |
# File 'lib/zm/client/message/message_flags.rb', line 38 def sent_by_me? all.include?('s') end |
#unflag! ⇒ Object
86 87 88 89 |
# File 'lib/zm/client/message/message_flags.rb', line 86 def unflag! attrs = { op: '!flag', id: @parent.id } @parent.sacc.invoke(build(attrs)) end |
#unread! ⇒ Object
actions
76 77 78 79 |
# File 'lib/zm/client/message/message_flags.rb', line 76 def unread! attrs = { op: '!read', id: @parent.id } @parent.sacc.invoke(build(attrs)) end |
#unread? ⇒ Boolean
properties
22 23 24 |
# File 'lib/zm/client/message/message_flags.rb', line 22 def unread? all.include?('u') end |
#urgent? ⇒ Boolean
62 63 64 |
# File 'lib/zm/client/message/message_flags.rb', line 62 def urgent? all.include?('!') end |