class Plate::HeaderNode

Attributes

level[RW]
text[RW]

Public Class Methods

new(level, text, body) click to toggle source
Calls superclass method
# File lib/plate/nodes.rb, line 44
def initialize(level, text, body)
  super(body)
  self.level = level
  self.text = text
end

Public Instance Methods

compile(compiler, parent = nil) click to toggle source
# File lib/plate/compiler.rb, line 224
def compile(compiler, parent = nil)
  tag = "h#{level}"
  style, script = compile_body(compiler, parent)
  "<#{tag}#{style}#{script}>#{text.compile(compiler, self)}</#{tag}>"
end
inspect() click to toggle source
# File lib/plate/nodes.rb, line 50
def inspect
  inspect_with([level, text])
end