Class: Plate::DivNode
- 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
- #compile(compiler, parent = nil) ⇒ Object
-
#initialize(body) ⇒ DivNode
constructor
A new instance of DivNode.
Methods inherited from RichNode
#compile_body, #parent_repeat?, #repeat?
Methods included from Inspector
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
208 209 210 211 |
# File 'lib/plate/compiler.rb', line 208 def compile(compiler, parent = nil) content, style, script = compile_body(compiler, parent) "<div#{style}#{script}>#{content}</div>" end |