/\A(?:1|t(?:rue)?|y(?:es|y*a+r+)?|aye)\Z/i
11 12 13
# File 'lib/boolify.rb', line 11 def boolify !!(self =~ REGEX) end