Class: Thunderbird::LocalFolder
- Inherits:
-
Object
- Object
- Thunderbird::LocalFolder
- Defined in:
- lib/thunderbird/local_folder.rb
Overview
A local folder is a file containing emails
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.
9 10 11 12 |
# File 'lib/thunderbird/local_folder.rb', line 9 def initialize(profile, path) @profile = profile @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/thunderbird/local_folder.rb', line 6 def path @path end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
7 8 9 |
# File 'lib/thunderbird/local_folder.rb', line 7 def profile @profile end |
Instance Method Details
#exists? ⇒ Boolean
30 31 32 |
# File 'lib/thunderbird/local_folder.rb', line 30 def exists? File.exist?(full_path) end |
#full_path ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/thunderbird/local_folder.rb', line 22 def full_path if in_subdirectory? File.join(subdirectory.full_path, folder_name) else folder_name end end |
#msf_exists? ⇒ Boolean
38 39 40 |
# File 'lib/thunderbird/local_folder.rb', line 38 def msf_exists? File.exist?(msf_path) end |
#msf_path ⇒ Object
34 35 36 |
# File 'lib/thunderbird/local_folder.rb', line 34 def msf_path "#{path}.msf" end |
#set_up ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/thunderbird/local_folder.rb', line 14 def set_up return if path_elements.empty? return true if !in_subdirectory? subdirectory.set_up end |