Module: Grepper::ResultsExtension
- Defined in:
- lib/grepper.rb
Overview
Provides the iteration intelligence for result sets.
Instance Method Summary collapse
Instance Method Details
#context? ⇒ Boolean
264 265 266 |
# File 'lib/grepper.rb', line 264 def context? @context = any? {|f,matches| matches.any? {|n,b,l,a| b || a } } end |
#each ⇒ Object
252 253 254 255 256 |
# File 'lib/grepper.rb', line 252 def each (0...size).each do |i| yield(self[i].file, self[i].matches) end end |
#each_result ⇒ Object
258 259 260 261 262 |
# File 'lib/grepper.rb', line 258 def each_result (0...size).each do |i| yield self[i] end end |