Fix misc rubocop warnings.

This commit is contained in:
evazion
2020-06-16 21:36:15 -05:00
parent dc460aab53
commit b551e3634f
25 changed files with 75 additions and 95 deletions

View File

@@ -16,7 +16,7 @@ module HasBitFlags
end
define_method("#{attribute}=") do |val|
if val.to_s =~ /t|1|y/
if val.to_s =~ /[t1y]/
send("#{field}=", send(field) | bit_flag)
else
send("#{field}=", send(field) & ~bit_flag)