Class: Tablette::HTMLRenderer
- Inherits:
-
Object
- Object
- Tablette::HTMLRenderer
- Defined in:
- lib/tablette/html_renderer.rb
Direct Known Subclasses
Instance Method Summary collapse
- #element=(element) ⇒ Object
- #produce_element(tag, attributes, content) ⇒ Object
- #to_html(root) ⇒ Object
- #wrap_content(proc) ⇒ Object
Instance Method Details
#element=(element) ⇒ Object
3 4 5 |
# File 'lib/tablette/html_renderer.rb', line 3 def element=(element) end |
#produce_element(tag, attributes, content) ⇒ Object
7 8 9 10 11 |
# File 'lib/tablette/html_renderer.rb', line 7 def produce_element(tag, attributes, content) content = content.join if content.kind_of? Array "<#{tag} #{to_html_args(attributes)}>#{content}</#{tag}>" end |
#to_html(root) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/tablette/html_renderer.rb', line 13 def to_html(root) if root.kind_of? Array root.join else root end end |
#wrap_content(proc) ⇒ Object
21 22 23 |
# File 'lib/tablette/html_renderer.rb', line 21 def wrap_content(proc) proc end |