Class: WorkOn::Config
- Inherits:
-
Object
- Object
- WorkOn::Config
- Defined in:
- lib/work_on/config.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_name) ⇒ Config
constructor
A new instance of Config.
- #project_dir ⇒ Object
- #windows ⇒ Object
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_dir ⇒ Object
8 9 10 |
# File 'lib/work_on/config.rb', line 8 def self.default_dir File. '~/.config/work-on/' end |
Instance Method Details
#project_dir ⇒ Object
22 23 24 |
# File 'lib/work_on/config.rb', line 22 def project_dir @config.project_dir end |
#windows ⇒ Object
18 19 20 |
# File 'lib/work_on/config.rb', line 18 def windows @config.windows end |