Sha256: c589233bb0b6e1b564c39180434acee8c4b3fbd1fcaf650499a02ee926464d13

Contents?: true

Size: 370 Bytes

Versions: 6

Compression:

Stored size: 370 Bytes

Contents

module Arbre

  # 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.
  class Container < Element
    def to_s
      content
    end

    def indent_level
      if parent
        parent.indent_level
      else
        0
      end
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arbre2-2.2.4 lib/arbre/container.rb
arbre2-2.2.3 lib/arbre/container.rb
arbre2-2.2.2 lib/arbre/container.rb
arbre2-2.2.1 lib/arbre/container.rb
arbre2-2.2.0 lib/arbre/container.rb
arbre2-2.1.0 lib/arbre/container.rb