Sha256: 7cfb1a88fb4c9504b8ce2166c3a8650f093ba4fa712d074cb252e38e20af7fcd

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

require 'installer.rb'

module VimDiff
  class Generator

    attr_accessor :left_file_path
    attr_accessor :right_file_path
    attr_accessor :html_diff_path

    def initialize(left_file_path, right_file_path, html_diff_path)
      self.left_file_path  = left_file_path
      self.right_file_path = right_file_path
      self.html_diff_path  = html_diff_path
    end

    def generate
      command = ("nohup vimdiff #{self.left_file_path} #{self.right_file_path} -c TOhtml  -c 'w! #{self.html_diff_path}' -c 'qa!'")
      say `#{command}`
      say "Generated file to #{self.html_diff_path}"
    end

    private

    def say(message)
      puts message
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vim_diff-0.0.1 lib/vim_diff.rb