Class: Plate::DivNode

Inherits:
RichNode show all
Defined in:
lib/plate/nodes.rb,
lib/plate/compiler.rb

Instance Attribute Summary

Attributes inherited from RichNode

#body, #parent, #scripts, #styles

Instance Method Summary collapse

Methods inherited from RichNode

#compile_body, #parent_repeat?, #repeat?

Methods included from Inspector

#inspect_with

Constructor Details

#initialize(body) ⇒ DivNode

Returns a new instance of DivNode.



74
75
76
# File 'lib/plate/nodes.rb', line 74

def initialize(body)
  super(body)
end

Instance Method Details

#compile(compiler, parent = nil) ⇒ Object



217
218
219
220
# File 'lib/plate/compiler.rb', line 217

def compile(compiler, parent = nil)
  content, style, script = compile_body(compiler, parent)
  "<div#{style}#{script}>#{content}</div>"
end