Class: Thunderbird::Profile

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

Overview

A configured user profile

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, entries:) ⇒ Profile

entries are lines from profile.ini



12
13
14
15
# File 'lib/thunderbird/profile.rb', line 12

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

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



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

def entries
  @entries
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

Instance Method Details

#local_folders_pathObject



25
26
27
# File 'lib/thunderbird/profile.rb', line 25

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

#rootObject



17
18
19
20
21
22
23
# File 'lib/thunderbird/profile.rb', line 17

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