Change initialization

This commit is contained in:
darthjee
2024-07-29 16:17:34 -03:00
parent 982201d954
commit e0841aad72
2 changed files with 2 additions and 2 deletions

View File

@@ -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|

View File

@@ -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 }