mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-11 17:19:58 +01:00
Change initialization
This commit is contained in:
@@ -6,7 +6,7 @@ class FontHelper
|
||||
|
||||
delegate :<<, to: :characters
|
||||
|
||||
def initialize(width, height, characters = nil)
|
||||
def initialize(width:, height:, characters: nil)
|
||||
@width = width
|
||||
@height = height
|
||||
@characters = characters.to_h do |character|
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe FontHelper::Font do
|
||||
subject(:font) { described_class.new(width, height, characters) }
|
||||
subject(:font) { described_class.new(width:, height:, characters:) }
|
||||
|
||||
let(:height) { Random.rand(10..30) }
|
||||
let(:width) { (height * 1.5).to_f }
|
||||
|
||||
Reference in New Issue
Block a user