Sha256: 6dbef84a73b5d399e27acfcfaae95f7c84336400bf572c8d9da31506b2d11bdc

Contents?: true

Size: 441 Bytes

Versions: 8

Compression:

Stored size: 441 Bytes

Contents

module Blocks
  class BlockRenderer < AbstractRenderer
    def render(*args, runtime_context)
      render_item = runtime_context.render_item
      if render_item.is_a?(String)
        output_buffer << partial_renderer.render(render_item, runtime_context)
      elsif render_item.is_a?(Proc)
        args = args + runtime_context.runtime_args
        output_buffer << capture(*args, runtime_context, &render_item)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blocks-3.0.0.rc8 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc7 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc6 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc5 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc4 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc3 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc2 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc1 lib/blocks/renderers/block_renderer.rb