Class: WorkOn::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/work_on/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_name) ⇒ Config

Returns a new instance of Config.



12
13
14
15
16
# File 'lib/work_on/config.rb', line 12

def initialize(project_name)
  file_name = find_file(project_name)
  raise "No config file found" unless file_name
  @config = find_config(file_name)
end

Class Method Details

.default_dirObject



8
9
10
# File 'lib/work_on/config.rb', line 8

def self.default_dir
  File.expand_path '~/.config/work-on/'
end

Instance Method Details

#project_dirObject



22
23
24
# File 'lib/work_on/config.rb', line 22

def project_dir
  @config.project_dir
end

#windowsObject



18
19
20
# File 'lib/work_on/config.rb', line 18

def windows
  @config.windows
end