Class: BlockHTML::XML
Instance Attribute Summary
Attributes inherited from BlockHTML
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ XML
constructor
A new instance of XML.
- #render(renderer) ⇒ Object
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 |