Class: Arbre::Container

Inherits:
Element show all
Defined in:
lib/arbre/container.rb

Overview

This element is a simple container for children. When rendered, it will simply render the children, making this element ‘invisible’. Use this class as a placeholder.

Direct Known Subclasses

Context

Instance Method Summary collapse

Methods inherited from Element

#+, #<<, #ancestors, #arbre_context, #assigns, #build!, #children, #content, #content=, #descendants, #empty?, #has_children?, #helpers, #initialize, #inspect, #orphan?, #parent, #parent=, #remove!, #respond_to?, #to_html

Methods included from Html::Querying

#child_tags, #descendant_tags, #find, #find_by_classes, #find_by_id, #find_by_tag, #find_by_tag_and_classes, #find_first

Methods included from Element::Building

#append_within, #append_within?, #build, #current_element, #current_flow, included, #insert, #insert_child, #prepend_within, #prepend_within?, #temporary

Constructor Details

This class inherits a constructor from Arbre::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Arbre::Element

Instance Method Details

#indent_levelObject



11
12
13
14
15
16
17
# File 'lib/arbre/container.rb', line 11

def indent_level
  if parent
    parent.indent_level
  else
    0
  end
end

#to_sObject



7
8
9
# File 'lib/arbre/container.rb', line 7

def to_s
  content
end