Class: Hbc::Config

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/cask/lib/hbc/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(appdir: "/Applications", prefpanedir: "~/Library/PreferencePanes", qlplugindir: "~/Library/QuickLook", dictionarydir: "~/Library/Dictionaries", fontdir: "~/Library/Fonts", colorpickerdir: "~/Library/ColorPickers", servicedir: "~/Library/Services", input_methoddir: "~/Library/Input Methods", internet_plugindir: "~/Library/Internet Plug-Ins", audio_unit_plugindir: "~/Library/Audio/Plug-Ins/Components", vst_plugindir: "~/Library/Audio/Plug-Ins/VST", vst3_plugindir: "~/Library/Audio/Plug-Ins/VST3", screen_saverdir: "~/Library/Screen Savers") ⇒ Config

Returns a new instance of Config



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'Library/Homebrew/cask/lib/hbc/config.rb', line 9

def initialize(
  appdir:               "/Applications",
  prefpanedir:          "~/Library/PreferencePanes",
  qlplugindir:          "~/Library/QuickLook",
  dictionarydir:        "~/Library/Dictionaries",
  fontdir:              "~/Library/Fonts",
  colorpickerdir:       "~/Library/ColorPickers",
  servicedir:           "~/Library/Services",
  input_methoddir:      "~/Library/Input Methods",
  internet_plugindir:   "~/Library/Internet Plug-Ins",
  audio_unit_plugindir: "~/Library/Audio/Plug-Ins/Components",
  vst_plugindir:        "~/Library/Audio/Plug-Ins/VST",
  vst3_plugindir:       "~/Library/Audio/Plug-Ins/VST3",
  screen_saverdir:      "~/Library/Screen Savers"
)

  self.appdir               = appdir
  self.prefpanedir          = prefpanedir
  self.qlplugindir          = qlplugindir
  self.dictionarydir        = dictionarydir
  self.fontdir              = fontdir
  self.colorpickerdir       = colorpickerdir
  self.servicedir           = servicedir
  self.input_methoddir      = input_methoddir
  self.internet_plugindir   = internet_plugindir
  self.audio_unit_plugindir = audio_unit_plugindir
  self.vst_plugindir        = vst_plugindir
  self.vst3_plugindir       = vst3_plugindir
  self.screen_saverdir      = screen_saverdir

  # `binarydir` is not customisable.
  @binarydir = HOMEBREW_PREFIX/"bin"
end

Instance Attribute Details

#binarydirObject (readonly)

Returns the value of attribute binarydir



7
8
9
# File 'Library/Homebrew/cask/lib/hbc/config.rb', line 7

def binarydir
  @binarydir
end

Class Method Details

.globalObject



3
4
5
# File 'Library/Homebrew/cask/lib/hbc/config.rb', line 3

def self.global
  @global ||= new
end