Class: Config
- Inherits:
-
Object
show all
- Defined in:
- lib/myosx/config.rb
Instance Method Summary
collapse
Instance Method Details
#config_file ⇒ Object
8
9
10
|
# File 'lib/myosx/config.rb', line 8
def config_file
ENV["MYOSX_CONFIG"] || File.expand_path('~/.myosx.cnf')
end
|
#create_workspace(directory) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/myosx/config.rb', line 20
def create_workspace(directory)
unless Dir.exists?(directory)
puts "Creating workspace: #{directory}"
Dir.mkdir("#{directory}", 0750)
end
end
|
#global ⇒ Object
12
13
14
|
# File 'lib/myosx/config.rb', line 12
def global
YAML.load_file(config_file)
end
|
#workspace_directory ⇒ Object
16
17
18
|
# File 'lib/myosx/config.rb', line 16
def workspace_directory
ENV['MYOSX_WORKSPACE'] || File.expand_path('~/.myosx/')
end
|