From e9375529132a038e6be60fb16fab56566817b64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn?= Date: Thu, 5 Mar 2026 13:43:15 +0100 Subject: [PATCH] Fix RuboCop Style/SelectByKind and Style/PredicateWithKind offenses --- lib/notare/document.rb | 2 +- test/document_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notare/document.rb b/lib/notare/document.rb index ec8b73f..c26d84f 100644 --- a/lib/notare/document.rb +++ b/lib/notare/document.rb @@ -56,7 +56,7 @@ module Notare end def lists - @nodes.select { |n| n.is_a?(Nodes::List) } + @nodes.grep(Nodes::List) end def uses_lists? diff --git a/test/document_test.rb b/test/document_test.rb index 6661f63..267d7f1 100644 --- a/test/document_test.rb +++ b/test/document_test.rb @@ -69,6 +69,6 @@ class DocumentTest < Minitest::Test doc.table { doc.tr { doc.td "Cell" } } assert_equal 2, doc.lists.count - assert(doc.lists.all? { |l| l.is_a?(Notare::Nodes::List) }) + assert(doc.lists.all?(Notare::Nodes::List)) end end