Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/text_sentencer/string_scan_offset.rb

Instance Method Summary collapse

Instance Method Details

#scan_offset(regex) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/text_sentencer/string_scan_offset.rb', line 2

def scan_offset(regex)
	Enumerator.new do |y|
		self.scan(regex) do
			y << Regexp.last_match
		end
	end
end