Sha256: 69c1b06592d76ad6450497f1b7ec8e76f07db65d4b2826fe6bea79eed58595bc

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

module Riif
  module Rails
    class TemplateHandler
      cattr_accessor :default_format
      self.default_format = Mime::IIF

      def self.call(template)
        <<-RUBY
          iif = ::Riif::IIF.new

          #{template.source}

          iif.output
        RUBY
      end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
riif-0.6.0 lib/riif/rails/template_handler.rb
riif-0.5.0 lib/riif/rails/template_handler.rb
riif-0.4.0 lib/riif/rails/template_handler.rb
riif-0.3.0 lib/riif/rails/template_handler.rb
riif-0.2.0 lib/riif/rails/template_handler.rb
riif-0.1.0 lib/riif/rails/template_handler.rb