mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-12 09:40:00 +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
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# 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
|
# Offense count: 2
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
# This cop supports safe autocorrection (--autocorrect).
|
||||||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ class FontHelper
|
|||||||
def initialize(width, height, characters = nil)
|
def initialize(width, height, characters = nil)
|
||||||
@width = width
|
@width = width
|
||||||
@height = height
|
@height = height
|
||||||
@characters = characters.map do |character|
|
@characters = characters.to_h do |character|
|
||||||
[character.code, character]
|
[character.code, character]
|
||||||
end.to_h
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def <<(character)
|
def <<(character)
|
||||||
|
|||||||
Reference in New Issue
Block a user