Sha256: d84b21dd2f86afcb664960610bea26354eaa2c2ab99963a5c19532b8d0b27a9e

Contents?: true

Size: 402 Bytes

Versions: 2

Compression:

Stored size: 402 Bytes

Contents

module RobotVim
  class Runner
    DEFAULT_VIM_BINARY = "vim"

    def initialize(args={})
      @vim_binary = args[:vim]
    end

    def vim_binary
      @vim_binary || DEFAULT_VIM_BINARY
    end

    def run(args={})
      ScriptFile.open(args[:commands]) do |script_file_path|
        Kernel.send(:`, "#{self.vim_binary} -n -s #{script_file_path} #{args[:input_file]}")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
robot-vim-0.1.1 lib/robot-vim/runner.rb
robot-vim-0.1.0 lib/robot-vim/runner.rb