From fbd4b22ab18b86a2f337f43f4f1f250850cc883a Mon Sep 17 00:00:00 2001 From: stephann <3025661+stephannv@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:31:21 -0300 Subject: [PATCH 1/2] Restrict separator `as` type Signed-off-by: stephann <3025661+stephannv@users.noreply.github.com> --- lib/ruby_ui/separator/separator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_ui/separator/separator.rb b/lib/ruby_ui/separator/separator.rb index 4c489647..92347347 100644 --- a/lib/ruby_ui/separator/separator.rb +++ b/lib/ruby_ui/separator/separator.rb @@ -7,7 +7,7 @@ class Separator < Base def initialize(as: :div, orientation: :horizontal, decorative: true, **attrs) raise ArgumentError, "Invalid orientation: #{orientation}" unless ORIENTATIONS.include?(orientation.to_sym) - @as = as.to_sym + @as = as @orientation = orientation.to_sym @decorative = decorative super(**attrs) From 1d21af85894651efcbf26c14be44259342cee670 Mon Sep 17 00:00:00 2001 From: stephann <3025661+stephannv@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:33:16 -0300 Subject: [PATCH 2/2] Update separator_test.rb Signed-off-by: stephann <3025661+stephannv@users.noreply.github.com> --- test/ruby_ui/separator_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby_ui/separator_test.rb b/test/ruby_ui/separator_test.rb index 31a8469e..b3964868 100644 --- a/test/ruby_ui/separator_test.rb +++ b/test/ruby_ui/separator_test.rb @@ -31,7 +31,7 @@ def test_render_with_decorative_false def test_render_with_custom_tag output = phlex do - RubyUI.Separator(as: "hr") + RubyUI.Separator(as: :hr) end assert_match(/