Sha256: 9b4479356f7b7bcb3d844cac2a6e56b569cc4d100edeba5e47836a4c7077cb56
Contents?: true
Size: 448 Bytes
Versions: 3
Compression:
Stored size: 448 Bytes
Contents
require File.expand_path('command', File.dirname(__FILE__)) module Nesta module Commands class Edit include Command def initialize(*args) @filename = Nesta::Config.page_path(args.shift) end def execute editor = ENV.fetch('EDITOR') rescue IndexError $stderr.puts "No editor: set EDITOR environment variable" else run_process(editor, @filename) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nesta-0.12.0 | lib/nesta/commands/edit.rb |
nesta-0.11.1 | lib/nesta/commands/edit.rb |
nesta-0.11.0 | lib/nesta/commands/edit.rb |