DEV: Replace Rails ends_with? with Ruby end_with? (#12507)

This commit is contained in:
Bianca Nenciu 2021-03-24 19:51:21 +02:00 committed by GitHub
parent 26e1ae17c4
commit 9dca7fe9a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -755,9 +755,9 @@ class Plugin::Instance
f_str = f.to_s
if File.directory?(f)
yield [f, true]
elsif f_str.ends_with?(".js.es6") || f_str.ends_with?(".hbs") || f_str.ends_with?(".hbr")
elsif f_str.end_with?(".js.es6") || f_str.end_with?(".hbs") || f_str.end_with?(".hbr")
yield [f, false]
elsif transpile_js && f_str.ends_with?(".js")
elsif transpile_js && f_str.end_with?(".js")
yield [f, false]
end
end