Class: Jank::GocodeCommand
Instance Method Summary collapse
- #dispatch ⇒ Object
-
#initialize(args, config, janker, executor) ⇒ GocodeCommand
constructor
A new instance of GocodeCommand.
Constructor Details
#initialize(args, config, janker, executor) ⇒ GocodeCommand
5 6 7 8 9 10 11 12 13 |
# File 'lib/gocode_command.rb', line 5 def initialize(args, config, janker, executor) super(args, config, janker, executor) @gocode = ENV['JANK_GOCODE'] || `which gocode`.chomp if @gocode.empty? STDERR.puts "gocode is not installed. See https://github.com/nsf/gocode" exit(1) end end |
Instance Method Details
#dispatch ⇒ Object
15 16 17 18 19 |
# File 'lib/gocode_command.rb', line 15 def dispatch @janker.link @exec.execute(@gocode, @args) @janker.sync_results end |