Class: Bemer::Builders::Tree::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/bemer/builders/tree/element.rb

Instance Method Summary collapse

Constructor Details

#initialize(tree, block) ⇒ Element

Returns a new instance of Element.



7
8
9
10
# File 'lib/bemer/builders/tree/element.rb', line 7

def initialize(tree, block)
  @tree  = tree
  @block = block
end

Instance Method Details

#elem(name = '', **options, &content) ⇒ Object



12
13
14
# File 'lib/bemer/builders/tree/element.rb', line 12

def elem(name = '', **options, &content)
  tree.add_node(block, name, options, &content)
end