Sha256: 1ecc5284401943d8a3f3c679f6b7064a9b516dd1db9a68117ebcaafa92076d6f
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
require 'stringio' class CapturedUI < Gem::StreamUI def initialize super($stdin, StringIO.new, $stderr, false) end end class Gem::Commands::EitCommand < Gem::Command def description 'Edit the gem for a given name or edit the file for a given require path' end def initialize super('eit', description) end def execute ui = CapturedUI.new Gem::DefaultUserInteraction.use_ui(ui) do Gem::GemRunner.new.run(['path'] + options[:args]) end exec(eit, ui.outs.string.strip) end def exec *args say(args.join(' ')) super end def eit ENV['EIT_EDITOR'] || ENV['EDITOR'] || 'vim' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gem-eit-0.5.1 | lib/rubygems/commands/eit_command.rb |