Sha256: 6053ef024b80b6ea9a2d0f2ea7923d1d6fa16e27097c1f39e4be22e79186ea42

Contents?: true

Size: 383 Bytes

Versions: 22

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Converters
    class RubyTemplates < Converter
      priority :highest
      input :rb

      def convert(content, convertible)
        erb_view = Bridgetown::ERBView.new(convertible)
        erb_view.instance_eval(
          content, convertible.path.to_s, line_start(convertible)
        ).to_s
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.3 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.2 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.1 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.0 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.1.0 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.1.0.beta1 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.0.0 lib/bridgetown-core/converters/ruby_templates.rb
bridgetown-core-1.0.0.beta3 lib/bridgetown-core/converters/ruby_templates.rb