Sha256: e95c261d2df6dc237cb02d45d9208750ca6dd6462da8a83ceeec4b0b4289e716

Contents?: true

Size: 408 Bytes

Versions: 4

Compression:

Stored size: 408 Bytes

Contents

module Riif
  module Rails
    class TemplateHandler
      cattr_accessor :default_format
      self.default_format = Mime[:iif]

      def self.call(template, source = nil)
        source ||= template.source

        <<-RUBY
          iif = ::Riif::IIF.new

          #{source}

          iif.output
        RUBY
      end

      ActionView::Template.register_template_handler :riif, self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
riif-1.1.0 lib/riif/rails/template_handler.rb
riif-1.0.0 lib/riif/rails/template_handler.rb
riif-0.9.0 lib/riif/rails/template_handler.rb
riif-0.8.0 lib/riif/rails/template_handler.rb