Class DiffTools::App
In: lib/diff_tools.rb
Parent: Object

Methods

new  

Public Class methods

[Source]

# File lib/diff_tools.rb, line 98
    def initialize ( stdin, stdout, stderr, argv )
      gre, neg, exc = [], [], []
      argv.each do |arg|
        case arg
        when /^(.*)!$/ then exc << $1
        when /^(.*)-$/ then neg << $1
        else gre << arg
        end
      end
      stdout.puts Diff.new(stdin.read).exclude(exc).negative(neg).grep(gre)
    end

[Validate]