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