What is the proper syntax for a method that checks a string for a pattern, and returns true or false if the regex matches?
Basic idea:
def has_regex?(str
If you want the put the pattern in a method, you can just do
def has_my_pattern(st) st =~ /pattern/ end
Or, perhaps better, put the pattern in a class variable instead?