Class: BlockHTML::XML

Inherits:
BlockHTML show all
Defined in:
lib/block-html.rb

Instance Attribute Summary

Attributes inherited from BlockHTML

#parent

Instance Method Summary collapse

Methods inherited from BlockHTML

#<<, #_p, #doctype, #each, #empty?, #escaped_text, #form, #method_missing, #p, #path, #root, #tag, #text, #to_s, #xml

Constructor Details

#initialize(attrs = {}) ⇒ XML

Returns a new instance of XML.



109
110
111
112
113
114
115
# File 'lib/block-html.rb', line 109

def initialize(attrs={})
  super()
  @attrs = {
    :version  => '1.0',
    :encoding => 'utf8'
  }.merge(attrs);
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BlockHTML

Instance Method Details

#render(renderer) ⇒ Object



117
118
119
# File 'lib/block-html.rb', line 117

def render(renderer)
  renderer.xml(@attrs)
end