Sha256: 49130386ad29e3092fc78289c8521d3f76c3e95176aecfa127ee7976eaa9146d

Contents?: true

Size: 571 Bytes

Versions: 10

Compression:

Stored size: 571 Bytes

Contents

module ActionView
  class Template
    module Handlers
      class Tex
        def handles_encoding?; true; end

        class_attribute :default_format
        self.default_format = Mime::PDF

        def erb_handler
          @@erb_handler ||= ActionView::Template.registered_template_handler(:erb)
        end

        def self.call(template)
          new.call(template)
        end

        def call(template)
          compiled_source = erb_handler.call(template)

          "Latexpdf::compile(begin;#{compiled_source};end)"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
latexpdf-0.4.10 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.9 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.8 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.7 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.6 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.5 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.4 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.3 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.2 lib/action_view/template_handlers/tex.rb
latexpdf-0.4.1 lib/action_view/template_handlers/tex.rb