Class: Wunderbar::DocTypeNode
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#declare ⇒ Object
Returns the value of attribute declare.
Attributes inherited from Node
#attrs, #children, #name, #node, #parent, #text
Instance Method Summary collapse
-
#initialize(*args) ⇒ DocTypeNode
constructor
A new instance of DocTypeNode.
- #serialize(options, result, indent) ⇒ Object
Methods inherited from Node
#add_child, #at, #method_missing, parse_css_selector, #preserve_spaces?, #root, #search, #walk
Constructor Details
#initialize(*args) ⇒ DocTypeNode
Returns a new instance of DocTypeNode.
257 258 259 260 |
# File 'lib/wunderbar/node.rb', line 257 def initialize(*args) @declare = args.shift @name = args.shift end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wunderbar::Node
Instance Attribute Details
#declare ⇒ Object
Returns the value of attribute declare.
255 256 257 |
# File 'lib/wunderbar/node.rb', line 255 def declare @declare end |
Instance Method Details
#serialize(options, result, indent) ⇒ Object
262 263 264 265 |
# File 'lib/wunderbar/node.rb', line 262 def serialize(, result, indent) result << "<!#{@declare} #{@name.to_s}>" result end |