Sha256: 39adaed5e96bd00d4cf261eeb1eaab63a5ce4e39a9cb70042e87bdefbc716989

Contents?: true

Size: 463 Bytes

Versions: 7

Compression:

Stored size: 463 Bytes

Contents

module Coprl::Presenters::WebClient::Helpers::Sinatra
  module TemplateHelper
    def with_presenters_wrapper(&block)
      buffer << partial("body/wrapper", locals: {
        body_content: capture(buffer, &block), header: @pom&.header, drawer: @pom&.drawer,
        footer: @pom&.footer
      })
    end

    def buffer()
      @_out_buf
    end

    def capture(buffer)
      pos = buffer.size
      yield
      buffer.slice!(pos..buffer.size)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb
coprl-3.0.0.beta.6 lib/coprl/presenters/web_client/helpers/sinatra/template_helper.rb