Sha256: 0312720d62325642b454202f0dfbf8bd1849ff6a8a2ac7177b3fcbd781204642

Contents?: true

Size: 614 Bytes

Versions: 3

Compression:

Stored size: 614 Bytes

Contents

require 'active_support/inflector'

module Ezprint
  autoload :PdfHelper, 'ezprint/pdf_helper'

  module Processors
    autoload :Base, 'ezprint/processors/base'
    autoload :Pdfkit, 'ezprint/processors/pdfkit'
    autoload :Prince, 'ezprint/processors/prince'
  end

  @@processor = :pdfkit
  mattr_accessor :processor

  def self.get_processor
    ::Ezprint::Processors.const_get(Ezprint.processor.to_s.classify)
  end
end

if defined?(::Rails::Railtie)
  require 'ezprint/railtie'
else
  # Rails 2.x
  Mime::Type.register 'application/pdf', :pdf
  ActionController::Base.send(:include, Ezprint::PdfHelper)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ezprint-1.0.1 lib/ezprint.rb
ezprint-1.0.0 lib/ezprint.rb
ezprint-0.3.1 lib/ezprint.rb