lib/pricecut/elements/li.rb in pricecut-0.0.2 vs lib/pricecut/elements/li.rb in pricecut-0.0.3

- old
+ new

@@ -1,14 +1,18 @@ module Pricecut module Elements class Li < Element def output! - case node.parent.name - when "ol" + if ordered_list? p "1. "; yield_children; eol - when "ul" + else p "- "; yield_children; eol end + end + + private + def ordered_list? + node.parent.name == "ol" end end end end