Class: Swordfish::Node::Raw

Inherits:
Base
  • Object
show all
Defined in:
lib/swordfish/nodes/raw.rb

Instance Attribute Summary

Attributes inherited from Base

#children, #content, #style

Instance Method Summary collapse

Methods inherited from Base

#clear_children, #find_nodes_by_type, #inform!, #initialize, #replace, #replace_with, #stylize, #wrap_children

Constructor Details

This class inherits a constructor from Swordfish::Node::Base

Instance Method Details

#append(node) ⇒ Object

Override Base append because a raw node should never have children

Raises:



9
10
11
# File 'lib/swordfish/nodes/raw.rb', line 9

def append(node)
  raise BadContentError
end

#to_htmlObject



13
14
15
# File 'lib/swordfish/nodes/raw.rb', line 13

def to_html
  @content
end