Class: Output::FileAndLine
- Inherits:
-
Object
- Object
- Output::FileAndLine
- Defined in:
- lib/output/file_and_line.rb
Instance Method Summary collapse
-
#initialize(grepmate) ⇒ FileAndLine
constructor
A new instance of FileAndLine.
- #process ⇒ Object
Constructor Details
#initialize(grepmate) ⇒ FileAndLine
Returns a new instance of FileAndLine.
3 4 5 |
# File 'lib/output/file_and_line.rb', line 3 def initialize(grepmate) @grepmate = grepmate end |
Instance Method Details
#process ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/output/file_and_line.rb', line 7 def process @grepmate.results.each{|line| if line puts line.split(':')[0..1].join(':') else puts line end } end |