module MultiTypograf

Constants

REQUIREMENT_MAP
VERSION

Public Class Methods

default_adapter() click to toggle source

The default adapter based on what you currently have loaded and installed. First checks to see if any adapters are already loaded, then checks to see which are installed if none are loaded.

# File lib/multi_typograf.rb, line 27
def default_adapter
  return :art_typograf if defined?(::ArtTypograf)
  return :typographer if defined?(::TypographerHelper::Parsers::Basic)
  return :typographica if defined?(::Typographica)
  return :typograf if defined?(::Typograf)

  REQUIREMENT_MAP.each do |(library, adapter)|
    begin
      require library
      return adapter
    rescue LoadError
      next
    end
  end

  :typograf
end