Class: Rxhp::Fragment

Inherits:
Element show all
Defined in:
lib/rxhp/fragment.rb

Overview

Fake element that only renders its’ children.

Can be used like an array, or if you just need something that acts like an element - this is used internally as the root of all render trees.

You probably don’t want to use this directly, as it doesn’t know to render strings. You might want HtmlFragment instead.

Direct Known Subclasses

HtmlFragment

Instance Attribute Summary

Attributes inherited from Element

#attributes, #children

Instance Method Summary collapse

Methods inherited from Element

#children?, #fill_options, #initialize, #render_children, #render_string, #valid?, #validate!

Methods included from Scope

current, define_element, with_parent

Constructor Details

This class inherits a constructor from Rxhp::Element

Instance Method Details

#render(options = {}) ⇒ Object



13
14
15
# File 'lib/rxhp/fragment.rb', line 13

def render options = {}
  self.render_children(options)
end