Class: MacSetup::SystemStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/mac_setup/system_status.rb

Instance Method Summary collapse

Constructor Details

#initializeSystemStatus

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_formulasObject



14
15
16
# File 'lib/mac_setup/system_status.rb', line 14

def installed_formulas
  @installed_formulas ||= get_formulas
end

#installed_tapsObject



10
11
12
# File 'lib/mac_setup/system_status.rb', line 10

def installed_taps
  @installed_taps ||= get_taps
end