mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-25 15:55:59 +00:00
More Rubocop
This commit is contained in:
@@ -43,8 +43,8 @@ class Module
|
||||
delimiter = class_method ? '.' : '#'
|
||||
|
||||
target.define_method(name) do |*args, **kvargs|
|
||||
alias_name = format('%s%s%s', class_name, delimiter, name)
|
||||
aliased_method_name = format('%s%s%s', class_name, delimiter, aliased_method)
|
||||
alias_name = sprintf('%s%s%s', class_name, delimiter, name)
|
||||
aliased_method_name = sprintf('%s%s%s', class_name, delimiter, aliased_method)
|
||||
Deprecation.warn_method(alias_name, removal_in, aliased_method_name)
|
||||
method(aliased_method).call(*args, **kvargs)
|
||||
end
|
||||
|
||||
@@ -413,12 +413,12 @@ module PluginManager
|
||||
# -1 if v1 is lower than v2
|
||||
#-----------------------------------------------------------------------------
|
||||
def self.compare_versions(v1, v2)
|
||||
d1 = v1.split("")
|
||||
d1 = v1.chars
|
||||
d1.insert(0, "0") if d1[0] == "." # Turn ".123" into "0.123"
|
||||
while d1[-1] == "." # Turn "123." into "123"
|
||||
d1 = d1[0..-2]
|
||||
end
|
||||
d2 = v2.split("")
|
||||
d2 = v2.chars
|
||||
d2.insert(0, "0") if d2[0] == "." # Turn ".123" into "0.123"
|
||||
while d2[-1] == "." # Turn "123." into "123"
|
||||
d2 = d2[0..-2]
|
||||
|
||||
@@ -9,9 +9,9 @@ class SpriteAnimation
|
||||
["x", "y", "ox", "oy", "viewport", "flash", "src_rect", "opacity", "tone"].each do |def_name|
|
||||
eval <<-__END__
|
||||
|
||||
def #{def_name}(*arg)
|
||||
@sprite.#{def_name}(*arg)
|
||||
end
|
||||
def #{def_name}(*arg) # def x(*arg)
|
||||
@sprite.#{def_name}(*arg) # @sprite.x(*arg)
|
||||
end # end
|
||||
|
||||
__END__
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user