Class: Asuka::Header

Inherits:
Object
  • Object
show all
Includes:
HTMLable
Defined in:
lib/asuka/document.rb

Instance Method Summary collapse

Methods included from HTMLable

#==, #wrap, #wrap_indent

Constructor Details

#initialize(line, level) ⇒ Header

Returns a new instance of Header.



110
111
112
113
# File 'lib/asuka/document.rb', line 110

def initialize(line, level)
  @line  = line
  @tag = "h#{level}"
end

Instance Method Details

#to_htmlObject



115
116
117
# File 'lib/asuka/document.rb', line 115

def to_html
  wrap tag, line
end