Module: Voom::Presenters::DSL::Components::Mixins::Attaches

Included in:
Card, Content, ExpansionPanel::Content, Form, Grid, Grid::Column
Defined in:
lib/voom/presenters/dsl/components/mixins/attaches.rb

Instance Method Summary collapse

Instance Method Details

#attach(presenter, **context_, &yield_block) ⇒ Object



7
8
9
10
11
# File 'lib/voom/presenters/dsl/components/mixins/attaches.rb', line 7

def attach(presenter, **context_, &yield_block)
  @_yield_block_ = yield_block
  pom = Voom::Presenters::App[presenter].call.expand_child(parent: self, context: context.merge(context_))
  @components += pom.components
end