Class: Asuka::List

Inherits:
LineGroup show all
Defined in:
lib/asuka/document.rb

Direct Known Subclasses

UnorderedList

Instance Method Summary collapse

Methods included from HTMLable

#==, #wrap, #wrap_indent

Constructor Details

#initialize(lines, tag) ⇒ List

Returns a new instance of List.



80
81
82
83
# File 'lib/asuka/document.rb', line 80

def initialize(lines, tag)
  super(lines)
  @tag = tag
end

Instance Method Details

#to_htmlObject



85
86
87
# File 'lib/asuka/document.rb', line 85

def to_html
  wrap_indent tag, lines.map { |line| ["<li>", line, "</li>"].join }.join("\n")
end