From 1f5a2f33ecac757b43b7a643fcf0fcf3db85c22c Mon Sep 17 00:00:00 2001 From: Glenn Date: Wed, 24 Jan 2024 00:28:46 +0100 Subject: [PATCH] fix: follow the crystal way for to_s --- src/utils/breadcrumbs.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/breadcrumbs.cr b/src/utils/breadcrumbs.cr index 89c54e9..f12c5f8 100644 --- a/src/utils/breadcrumbs.cr +++ b/src/utils/breadcrumbs.cr @@ -4,12 +4,12 @@ module GX::Utils @ancestors = base end - def +(elem : String) - b = BreadCrumbs.new(@ancestors + [elem]) + def +(other : String) + BreadCrumbs.new(@ancestors + [other]) end - def to_s - @ancestors.join(" ") + def to_s(io : IO) + io << @ancestors.join(" ") end def to_a