Class: MacSetup::SystemStatus
- Inherits:
-
Object
- Object
- MacSetup::SystemStatus
- Defined in:
- lib/mac_setup/system_status.rb
Instance Method Summary collapse
- #defaults_value(domain, key) ⇒ Object
- #git_changes(key, changes = nil) ⇒ Object
-
#initialize ⇒ SystemStatus
constructor
A new instance of SystemStatus.
- #installed_formulas ⇒ Object
- #installed_taps ⇒ Object
Constructor Details
#initialize ⇒ SystemStatus
Returns a new instance of SystemStatus.
5 6 7 8 |
# File 'lib/mac_setup/system_status.rb', line 5 def initialize @git_changes = Hash.new { |hash, key| hash[key] = [] } @defaults = Hash.new { |hash, key| hash[key] = {} } end |
Instance Method Details
#defaults_value(domain, key) ⇒ Object
26 27 28 |
# File 'lib/mac_setup/system_status.rb', line 26 def defaults_value(domain, key) @defaults[domain][key] ||= read_defaults_value(domain, key) end |
#git_changes(key, changes = nil) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/mac_setup/system_status.rb', line 18 def git_changes(key, changes = nil) if changes @git_changes[key] = changes else @git_changes[key] end end |
#installed_formulas ⇒ Object
14 15 16 |
# File 'lib/mac_setup/system_status.rb', line 14 def installed_formulas @installed_formulas ||= get_formulas end |
#installed_taps ⇒ Object
10 11 12 |
# File 'lib/mac_setup/system_status.rb', line 10 def installed_taps @installed_taps ||= get_taps end |