Class: Thunderbird::Profile

Inherits:
Object
  • Object
show all
Defined in:
lib/thunderbird/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, entries) ⇒ Profile

entries are lines from profile.ini



8
9
10
11
# File 'lib/thunderbird/profile.rb', line 8

def initialize(title, entries)
  @title = title
  @entries = entries
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



5
6
7
# File 'lib/thunderbird/profile.rb', line 5

def entries
  @entries
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/thunderbird/profile.rb', line 4

def title
  @title
end

Instance Method Details

#local_folders_pathObject



21
22
23
# File 'lib/thunderbird/profile.rb', line 21

def local_folders_path
  File.join(root, "Mail", "Local Folders")
end

#rootObject



13
14
15
16
17
18
19
# File 'lib/thunderbird/profile.rb', line 13

def root
  if relative?
    File.join(Thunderbird.new.data_path, entries[:Path])
  else
    entries[:Path]
  end
end