mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-12 01:29:58 +01:00
Use to_h
This commit is contained in:
@@ -6,12 +6,6 @@
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/MapToHash:
|
||||
Exclude:
|
||||
- 'source/font_helper/font.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
||||
|
||||
@@ -9,9 +9,9 @@ class FontHelper
|
||||
def initialize(width, height, characters = nil)
|
||||
@width = width
|
||||
@height = height
|
||||
@characters = characters.map do |character|
|
||||
@characters = characters.to_h do |character|
|
||||
[character.code, character]
|
||||
end.to_h
|
||||
end
|
||||
end
|
||||
|
||||
def <<(character)
|
||||
|
||||
Reference in New Issue
Block a user