Class: Wunderbar::DocTypeNode

Inherits:
Node
  • Object
show all
Defined in:
lib/wunderbar/node.rb

Constant Summary

Constants inherited from Node

Node::ESCAPE, Node::VOID

Instance Attribute Summary collapse

Attributes inherited from Node

#attrs, #children, #name, #node, #parent, #text

Instance Method Summary collapse

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

#declareObject

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(options, result, indent)
  result << "<!#{@declare} #{@name.to_s}>"
  result
end