mirror of https://github.com/Siphonay/mastodon
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.
This commit is contained in:
parent
9f609bc94e
commit
a4851100fd
|
@ -38,7 +38,7 @@ class KeywordMute < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def =~(str)
|
def =~(str)
|
||||||
@regex ? @regex =~ str : false
|
regex ? regex =~ str : false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue