Sha256: 3456003647474b06bc19483339c6b472a492348f19a714a1e19643d0b88d9cb6

Contents?: true

Size: 486 Bytes

Versions: 6

Compression:

Stored size: 486 Bytes

Contents

module Blocks
  class BlockRenderer < AbstractRenderer
    def render(*args, runtime_context)
      render_item = runtime_context.render_item
      if render_item.is_a?(String) || render_item.respond_to?(:to_partial_path)
        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

6 entries across 6 versions & 1 rubygems

Version Path
blocks-3.0.4 lib/blocks/renderers/block_renderer.rb
blocks-3.0.3 lib/blocks/renderers/block_renderer.rb
blocks-3.0.2 lib/blocks/renderers/block_renderer.rb
blocks-3.0.1 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0 lib/blocks/renderers/block_renderer.rb
blocks-3.0.0.rc9 lib/blocks/renderers/block_renderer.rb