Sha256: de1019e13c9c1efe3f1a50a57a8fde58938d8f60d13cf382b09d5c2e3f0981ef

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

require_relative "tilt/scope"

module Munge
  module Transformer
    class Tilt
      def initialize(scope_factory)
        @scope = scope_factory.create
      end

      def call(item, content = nil, renderer = nil)
        if content.nil?
          @scope.render_with_layout(item, renderer)
        else
          @scope.render_with_layout(item, renderer) do
            content
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
munge-0.2.0 lib/munge/transformer/tilt.rb