Class: Antwort::EmailCollection
- Inherits:
-
Object
- Object
- Antwort::EmailCollection
- Includes:
- FileHelpers, Helpers
- Defined in:
- lib/antwort/email/collection.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize ⇒ EmailCollection
constructor
A new instance of EmailCollection.
- #total ⇒ Object
Methods included from FileHelpers
#count_files, #create_file!, #email_id_from_folder_name, #list_folders
Methods included from Helpers
Constructor Details
#initialize ⇒ EmailCollection
Returns a new instance of EmailCollection.
8 9 10 11 12 13 14 |
# File 'lib/antwort/email/collection.rb', line 8 def initialize @templates = [] @list = [] dir = './emails' find_templates(dir) if Dir.exist? dir end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
6 7 8 |
# File 'lib/antwort/email/collection.rb', line 6 def list @list end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
6 7 8 |
# File 'lib/antwort/email/collection.rb', line 6 def templates @templates end |
Instance Method Details
#empty? ⇒ Boolean
16 17 18 |
# File 'lib/antwort/email/collection.rb', line 16 def empty? @templates.empty? end |
#total ⇒ Object
20 21 22 |
# File 'lib/antwort/email/collection.rb', line 20 def total @templates.length end |