Sha256: e4c3f1296500d54353b2090107516a2d2aeffb59fd4c3c3fc5362a2b7ae9960a

Contents?: true

Size: 314 Bytes

Versions: 1

Compression:

Stored size: 314 Bytes

Contents

module Pricecut
  module Elements
    class Li < Element
      def output!
        if ordered_list?
          p "1.  "; yield_children; eol
        else
          p "-  "; yield_children; eol
        end
      end

      private
      def ordered_list?
        node.parent.name == "ol"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pricecut-0.0.3 lib/pricecut/elements/li.rb