Method: String#words

Defined in:
lib/extra_lib/core_ext/string.rb

#wordsObject

Get an array of “words”.

Example: "hello, world!".words #=> ["hello", "world"]

Returns: Array



102
103
104
# File 'lib/extra_lib/core_ext/string.rb', line 102

def words
	scan(/\w+/u)
end