Module: Grepper::MatchesExtension
- Defined in:
- lib/grepper.rb
Overview
Provides the iteration intelligence for match sets.
Instance Method Summary collapse
Instance Method Details
#each ⇒ Object
271 272 273 274 275 276 |
# File 'lib/grepper.rb', line 271 def each (0...size).each do |i| m = self[i] yield(m.lineno,m.before,m.line,m.after) end end |
#each_match ⇒ Object
278 279 280 281 282 |
# File 'lib/grepper.rb', line 278 def each_match (0...size).each do |i| yield(self[i]) end end |