Sha256: 67f209ef868d91d35b0e6c18068f86be30fabdc86817a0cc5afa253919fb2904

Contents?: true

Size: 680 Bytes

Versions: 6

Compression:

Stored size: 680 Bytes

Contents

module Voom
  module Presenters
    module DSL
      module Components
        module Mixins
          module Attaches
            include Namespace
            def attach(presenter, **params, &yield_block)
              @_yield_block_ = yield_block
              fq_presenter = _expand_namespace_(presenter, namespace)
              presenter = Presenters::App.registered?(fq_presenter) ? fq_presenter : presenter
              pom = Voom::Presenters::App[presenter].call.expand_child(parent: self, context: context.merge(params))
              @components += pom.components if @components
              pom
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 lib/voom/presenters/dsl/components/mixins/attaches.rb
voom-presenters-2.1.0 lib/voom/presenters/dsl/components/mixins/attaches.rb
voom-presenters-2.0.3 lib/voom/presenters/dsl/components/mixins/attaches.rb
voom-presenters-2.0.2 lib/voom/presenters/dsl/components/mixins/attaches.rb
voom-presenters-2.0.1 lib/voom/presenters/dsl/components/mixins/attaches.rb
voom-presenters-2.0.0 lib/voom/presenters/dsl/components/mixins/attaches.rb