Class: Asuka::List
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(lines, tag) ⇒ List
constructor
A new instance of List.
- #to_html ⇒ Object
Methods included from HTMLable
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_html ⇒ Object
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 |