Fix Performance/DeletePrefix cop (#24796)
This commit is contained in:
1 parent
05e3abe9d9
commit
668a19a2f3
10 files changed
+9
-24
No files matched your search
@@ -13,7 +13,7 @@ module ActivityPub::CaseTransform
|
||||
when Symbol then camel_lower(value.to_s).to_sym
|
||||
when String
|
||||
camel_lower_cache[value] ||= if value.start_with?('_:')
|
||||
"_:#{value.gsub(/\A_:/, '').underscore.camelize(:lower)}"
|
||||
"_:#{value.delete_prefix('_:').underscore.camelize(:lower)}"
|
||||
else
|
||||
value.underscore.camelize(:lower)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user