mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Lots of rubocop
This commit is contained in:
@@ -41,9 +41,7 @@ class CharacterEntryHelper
|
||||
return false if @maxlength >= 0 && chars.length >= @maxlength
|
||||
chars.insert(@cursor, ch)
|
||||
@text = ""
|
||||
chars.each do |ch|
|
||||
@text += ch if ch
|
||||
end
|
||||
chars.each { |char| @text += char if char }
|
||||
@cursor += 1
|
||||
return true
|
||||
end
|
||||
@@ -66,14 +64,14 @@ class CharacterEntryHelper
|
||||
return true
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
private
|
||||
|
||||
def ensure
|
||||
return if @maxlength < 0
|
||||
chars = self.text.scan(/./m)
|
||||
if chars.length > @maxlength && @maxlength >= 0
|
||||
chars = chars[0, @maxlength]
|
||||
end
|
||||
chars = chars[0, @maxlength] if chars.length > @maxlength && @maxlength >= 0
|
||||
@text = ""
|
||||
chars.each do |ch|
|
||||
@text += ch if ch
|
||||
|
||||
Reference in New Issue
Block a user