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