Class: Thunderbird::LocalFolder
- Inherits:
-
Object
- Object
- Thunderbird::LocalFolder
- Defined in:
- lib/thunderbird/local_folder.rb
Overview
A local folder is a file containing emails It is not a “live” folder that is sync-able with an online account
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
Instance Method Summary collapse
- #exists? ⇒ Boolean
- #full_path ⇒ Object
-
#initialize(profile:, path:) ⇒ LocalFolder
constructor
A new instance of LocalFolder.
- #msf_exists? ⇒ Boolean
- #msf_path ⇒ Object
- #set_up ⇒ Object
Constructor Details
#initialize(profile:, path:) ⇒ LocalFolder
Returns a new instance of LocalFolder.
12 13 14 15 |
# File 'lib/thunderbird/local_folder.rb', line 12 def initialize(profile:, path:) @profile = profile @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/thunderbird/local_folder.rb', line 9 def path @path end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
10 11 12 |
# File 'lib/thunderbird/local_folder.rb', line 10 def profile @profile end |
Instance Method Details
#exists? ⇒ Boolean
33 34 35 |
# File 'lib/thunderbird/local_folder.rb', line 33 def exists? File.exist?(full_path) end |
#full_path ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/thunderbird/local_folder.rb', line 25 def full_path if in_subdirectory? File.join(subdirectory.full_path, folder_name) else path end end |
#msf_exists? ⇒ Boolean
41 42 43 |
# File 'lib/thunderbird/local_folder.rb', line 41 def msf_exists? File.exist?(msf_path) end |
#msf_path ⇒ Object
37 38 39 |
# File 'lib/thunderbird/local_folder.rb', line 37 def msf_path "#{full_path}.msf" end |
#set_up ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/thunderbird/local_folder.rb', line 17 def set_up return false if path_elements.empty? return true if !in_subdirectory? subdirectory.set_up end |