Module: Worklog
- Included in:
- Services
- Defined in:
- lib/worklog.rb,
lib/worklog/cli.rb,
lib/worklog/dsl.rb,
lib/worklog/printer.rb,
lib/worklog/version.rb,
lib/worklog/entities.rb,
lib/worklog/services.rb,
lib/worklog/decorator.rb,
lib/worklog/entities/sheet.rb,
lib/worklog/entities/track.rb,
lib/worklog/services/service.rb,
lib/worklog/services/new_worklog.rb,
lib/worklog/services/get_worklogs.rb
Defined Under Namespace
Modules: Entities, Services Classes: CLI, DSL, Decorator, Error, Printer
Constant Summary collapse
- LOGMASK =
FILE_MASK = “*.timelog”.freeze
"*.worklog".freeze
- GEMHOME =
".worklog".freeze
- STORAGE =
"index.yml".freeze
- VERSION =
"0.1.1"
Instance Method Summary collapse
Instance Method Details
#indexd ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/worklog.rb', line 24 def indexd return if Dir.glob(LOGMASK).empty? return if params[:index].include? Dir.pwd params[:index] << Dir.pwd home = File.join(Dir.home, GEMHOME) Dir.mkdir(home) unless Dir.exist?(home) File.write( File.join(home, STORAGE), YAML.dump(params) ) end |
#params ⇒ Object
20 21 22 |
# File 'lib/worklog.rb', line 20 def params @params ||= read_params end |