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
241 242 243 244 245 246 |
# File 'lib/grepper.rb', line 241 def each (0...size).each do |i| m = self[i] yield(m.lineno,m.before,m.line,m.after) end end |
#each_match ⇒ Object
248 249 250 251 252 |
# File 'lib/grepper.rb', line 248 def each_match (0...size).each do |i| yield(self[i]) end end |