class Plate::LinkNode

Attributes

href[RW]
text[RW]

Public Class Methods

new(text, href, attributes) click to toggle source
# File lib/plate/nodes.rb, line 85
def initialize(text, href, attributes)
  self.text = text
  self.href = href
  self.attributes = attributes
end

Public Instance Methods

compile(compiler, parent = nil) click to toggle source
# File lib/plate/compiler.rb, line 240
def compile(compiler, parent = nil)
  content = text.compile(compiler)
  attr = compile_attributes(compiler)
  "<a href=\"#{href.compile(compiler)}\"#{attr}>#{content}</a>"
end
inspect() click to toggle source
# File lib/plate/nodes.rb, line 91
def inspect
  inspect_with([text, href])
end