Class: WorkOn::ConfigParser
- Inherits:
-
Object
- Object
- WorkOn::ConfigParser
- Defined in:
- lib/work_on/config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#project_dir ⇒ Object
should be set to the complete and expanded path to the project.
-
#windows ⇒ Object
windows is an hash which looks like this => [[‘ls -al’, ‘ls’], [‘ls’]] the above hash would open 2 tabs.
Instance Method Summary collapse
-
#initialize(file_name) ⇒ ConfigParser
constructor
A new instance of ConfigParser.
-
#parse(file_name) ⇒ Object
this method should read and parse the file will be called when initialized implementations should set @windows and @project_dir.
Constructor Details
#initialize(file_name) ⇒ ConfigParser
Returns a new instance of ConfigParser.
63 64 65 66 |
# File 'lib/work_on/config.rb', line 63 def initialize(file_name) @windows = {} parse(file_name) end |
Instance Attribute Details
#project_dir ⇒ Object
should be set to the complete and expanded path to the project
61 62 63 |
# File 'lib/work_on/config.rb', line 61 def project_dir @project_dir end |
#windows ⇒ Object
windows is an hash which looks like this => [[‘ls -al’, ‘ls’], [‘ls’]] the above hash would open 2 tabs
if additional windows need to be opened you can specify the windows key (and provide and array of tab
hashes)
=> {[{:tabs => [], =>[]]}}
58 59 60 |
# File 'lib/work_on/config.rb', line 58 def windows @windows end |
Instance Method Details
#parse(file_name) ⇒ Object
this method should read and parse the file will be called when initialized implementations should set @windows and @project_dir
76 77 78 |
# File 'lib/work_on/config.rb', line 76 def parse(file_name) not_implemented end |