Module: Grepity

Defined in:
lib/grepity.rb,
lib/grepity/line.rb,
lib/grepity/option.rb,
lib/grepity/version.rb,
lib/grepity/target_file.rb,
lib/grepity/target_text.rb

Defined Under Namespace

Classes: Line, Option, TargetFile, TargetText

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.run!Object



7
8
9
10
11
12
13
# File 'lib/grepity.rb', line 7

def self.run!
  options = Option.parse
  text = TargetText.new(ARGV[0], options)
  TargetFile.new(ARGV[1]).match(text.value).each do |line|
    puts line.result(text.value, options)
  end
end