Module: DeepCover::Tools::ScanMatchDatas

Defined in:
lib/deep_cover/tools/scan_match_datas.rb

Instance Method Summary collapse

Instance Method Details

#scan_match_datas(source, matcher) ⇒ Object

Like String#scan, but return the MatchData object instead



6
7
8
# File 'lib/deep_cover/tools/scan_match_datas.rb', line 6

def scan_match_datas(source, matcher)
  source.to_enum(:scan, matcher).map { Regexp.last_match }
end