Class: Gpuzzletime::Command::Edit

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(config, file) ⇒ Edit

Returns a new instance of Edit.



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

def initialize(config, file)
  @config = config
  @script = Script.new(@config[:dir])
  @file   = file
end

Instance Method Details

#needs_entries?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/gpuzzletime/command/edit.rb', line 14

def needs_entries?
  false
end

#runObject



18
19
20
# File 'lib/gpuzzletime/command/edit.rb', line 18

def run
  launch_editor(@file)
end