Add Rule#empty?

This commit is contained in:
Josh Holtrop 2022-06-14 07:35:38 -04:00
parent c1769503a8
commit 291509f005

View File

@ -42,6 +42,16 @@ class Propane
@line_number = line_number @line_number = line_number
end end
# Return whether the Rule is empty.
#
# A Rule is empty if it has no components.
#
# @return [Boolean]
# Whether the Rule is empty.
def empty?
@components.empty?
end
end end
end end