Method: Verbal#any_of

Defined in:
lib/verbal.rb

#any_of(value) ⇒ Object Also known as: any

Matches any one of the characters in value.

Examples:

Find one of ‘abc’ in ‘xkcd’

verbal = Verbal.new do
  any_of 'abc'
end
'xkcd'.scan verbal # => ['c']

Parameters:

  • value (String)

    string of characters to match



146
147
148
# File 'lib/verbal.rb', line 146

def any_of(value)
  append "[#{sanitize value}]"
end