Class: Nesta::Commands::Edit
- Inherits:
-
Object
- Object
- Nesta::Commands::Edit
- Defined in:
- lib/nesta/commands/edit.rb
Instance Method Summary collapse
- #execute(process) ⇒ Object
-
#initialize(*args) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
Instance Method Details
#execute(process) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/nesta/commands/edit.rb', line 8 def execute(process) editor = ENV.fetch('EDITOR') rescue IndexError $stderr.puts "No editor: set EDITOR environment variable" else process.run(editor, @filename) end |