Sha256: 10a59b3ec6c2c8d76aa9933bca8ffdced0a6446acd8362b030c8f3de29a3d69d

Contents?: true

Size: 287 Bytes

Versions: 5

Compression:

Stored size: 287 Bytes

Contents

# frozen_string_literal: true

require 'action_view'

module Bemer
  class Renderer
    include ::ActionView::Helpers::TagHelper

    def render(builder)
      return builder.content if builder.tag.blank?

      content_tag(builder.tag, builder.content, builder.attrs)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bemer-0.6.0 lib/bemer/renderer.rb
bemer-0.5.0 lib/bemer/renderer.rb
bemer-0.4.0 lib/bemer/renderer.rb
bemer-0.3.0 lib/bemer/renderer.rb
bemer-0.2.0 lib/bemer/renderer.rb