Make use of the regex attr_reader. #164.

It would also have been valid to get rid of the attr_reader, but I like
being able to reach inside KeywordMute::Matcher without resorting to
instance_variable_get tomfoolery.
lolsob-rspec
David Yip 2017-10-14 20:45:14 -05:00
parent 2c11e95efd
commit f3a57932c0
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class KeywordMute < ApplicationRecord
end
def =~(str)
@regex ? @regex =~ str : false
regex ? regex =~ str : false
end
end
end