Sha256: bfd653afc5f1798c2d8bec8e23a744a43fe5639cd4e9fe1544de1f5a59717d59

Contents?: true

Size: 807 Bytes

Versions: 10

Compression:

Stored size: 807 Bytes

Contents

require "rbconfig"
require "logger"
require "securerandom"

# Version
require "latexpdf/version"
require "latexpdf/configuration"

# Errors
require "latexpdf/errors/latexpdf_error"

# Generator
require "latexpdf/pdf_generator"

# Escaper
require "latexpdf/escaper"

require "latexpdf/railtie" if defined?(Rails)

module Latexpdf 
  class << self
    attr_writer   :configuration
    attr_writer   :logger
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration
  end

  def self.logger
    @logger ||= configuration.logger
  end

  def self.compile(tex, target=nil)
    generator = PdfGenerator.new(tex)
    begin
      generator.generate target
      generator.content unless target
    ensure
      generator.cleanup
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
latexpdf-0.6.1 lib/latexpdf.rb
latexpdf-0.6.0 lib/latexpdf.rb
latexpdf-0.5.1 lib/latexpdf.rb
latexpdf-0.5.0 lib/latexpdf.rb
latexpdf-0.4.11 lib/latexpdf.rb
latexpdf-0.4.10 lib/latexpdf.rb
latexpdf-0.4.9 lib/latexpdf.rb
latexpdf-0.4.8 lib/latexpdf.rb
latexpdf-0.4.7 lib/latexpdf.rb
latexpdf-0.4.6 lib/latexpdf.rb