Class: Quadtone::Tools::Edit

Inherits:
Quadtone::Tool show all
Defined in:
lib/quadtone/tools/edit.rb

Instance Attribute Summary

Attributes inherited from Quadtone::Tool

#profile, #verbose

Instance Method Summary collapse

Methods inherited from Quadtone::Tool

#load_profile, #parse_global_option, #parse_option, process_args, #process_environment

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/quadtone/tools/edit.rb', line 7

def run
  editor = ENV['EDITOR'] or raise "Can't determine editor"
  system(editor,
    '--wait',
    @profile.qtr_profile_path.to_s)
  @profile = Profile.load(@profile.name)
  @profile.check
  @profile.save
  @profile.show
end