Class: ContextIO::Folder

Inherits:
Object
  • Object
show all
Defined in:
lib/contextio/folder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.association_nameObject



5
6
7
# File 'lib/contextio/folder.rb', line 5

def self.association_name
  :folder
end

Instance Method Details

#has_children?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/contextio/folder.rb', line 40

def has_children?
  attributes['HasChildren']
end

#imap_attributesObject



48
49
50
# File 'lib/contextio/folder.rb', line 48

def imap_attributes
  attributes
end

#marked?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/contextio/folder.rb', line 44

def marked?
  attributes['Marked']
end

#messagesObject



52
53
54
55
56
# File 'lib/contextio/folder.rb', line 52

def messages
  association_class = ContextIO::API::AssociationHelpers.class_for_association_name(:messages)

  @messages ||= association_class.new(api, account: source.).where(folder: self.name)
end