Class: Ncn::Editor

Inherits:
Object
  • Object
show all
Defined in:
lib/ncn/editor.rb

Class Method Summary collapse

Class Method Details

.to_procObject



3
4
5
6
# File 'lib/ncn/editor.rb', line 3

def self.to_proc
  editor = ENV["EDITOR"] || raise("$EDITOR not defined")
  ->(file_name) { system("#{editor} \"#{file_name}\"") }
end