Class: BlockHTML::Text

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

Direct Known Subclasses

EscapedText

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(text) ⇒ Text

Returns a new instance of Text.



155
156
157
158
# File 'lib/block-html.rb', line 155

def initialize(text)
  super()
  @text = text
end

Dynamic Method Handling

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

Instance Method Details

#render(renderer) ⇒ Object



160
161
162
# File 'lib/block-html.rb', line 160

def render(renderer)
  renderer.text(@text)
end