Class: Thunderbird::Profiles
- Inherits:
-
Object
- Object
- Thunderbird::Profiles
- Defined in:
- lib/thunderbird/profiles.rb
Overview
Instance Method Summary collapse
Instance Method Details
#installs ⇒ Object
22 23 24 25 26 27 |
# File 'lib/thunderbird/profiles.rb', line 22 def installs @installs ||= begin pairs = blocks.filter { |name, _entries| name.start_with?("Install") } pairs.map { |title, entries| Thunderbird::Install.new(title: title, entries: entries) } end end |
#profile(name) ⇒ Object
16 17 18 19 20 |
# File 'lib/thunderbird/profiles.rb', line 16 def profile(name) title, entries = blocks.find { |_name, entries| entries[:Name] == name } Thunderbird::Profile.new(title: title, entries: entries) if title end |
#profile_for_path(path) ⇒ Object
10 11 12 13 14 |
# File 'lib/thunderbird/profiles.rb', line 10 def profile_for_path(path) title, entries = blocks.find { |_name, entries| entries[:Path] == path } Thunderbird::Profile.new(title: title, entries: entries) if title end |