Fix RuboCop Style/SelectByKind and Style/PredicateWithKind offenses
All checks were successful
CI Pipeline / build (pull_request) Successful in 1m8s
All checks were successful
CI Pipeline / build (pull_request) Successful in 1m8s
This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user