Module: Arbre::Element::BuilderMethods
- Defined in:
- lib/arbre/patches.rb
Instance Method Summary collapse
-
#build_tag(klass, *args, &block) ⇒ Object
we do not want to check the arity of the block in express templates because components are expected to be able to contain other components or template code without use of a builder style syntax.
Instance Method Details
#build_tag(klass, *args, &block) ⇒ Object
we do not want to check the arity of the block in express templates because components are expected to be able to contain other components or template code without use of a builder style syntax
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/arbre/patches.rb', line 16 def build_tag(klass, *args, &block) tag = klass.new(arbre_context) tag.parent = current_arbre_element with_current_arbre_element tag do tag.build(*args, &block) end tag end |