class String
Custom scan that returns a boolean indicating whether the regex matched. TODO: Is there a way to avoid doing this?
Public Instance Methods
my_scan(re) { |arr| ... }
click to toggle source
# File lib/rarff.rb, line 11 def my_scan(re) hit = false scan(re) { |arr| yield arr if block_given? hit = true } hit end