lib/snibbets/array.rb in snibbets-2.0.30 vs lib/snibbets/array.rb in snibbets-2.0.31
- old
+ new
@@ -2,9 +2,13 @@
class ::Array
def blocks
select { |el| el =~ /^<block\d+>$/ }.count
end
+ def notes
+ select { |el| el !~ /^<block\d+>$/ && el !~ /^```/ && !el.strip.empty? }.count
+ end
+
def strip_empty
remove_leading_empty_elements.remove_trailing_empty_elements
end
def strip_empty!