Class: Ptimelog::Command::Edit

Inherits:
Base
  • Object
show all
Defined in:
lib/ptimelog/command/edit.rb

Overview

edit one file. without argument, it will edit the timelog, otherwise a parser-script is loaded

Instance Method Summary collapse

Methods inherited from Base

#entries=, #needs_entries?

Constructor Details

#initialize(file) ⇒ Edit

Returns a new instance of Edit.



8
9
10
11
12
13
# File 'lib/ptimelog/command/edit.rb', line 8

def initialize(file)
  super()

  @scripts = Script.new(@config[:dir])
  @file    = file
end

Instance Method Details

#runObject



15
16
17
# File 'lib/ptimelog/command/edit.rb', line 15

def run
  launch_editor(@file)
end