Sha256: dd2e9a28cb954e1ed1525742590c18a3588a850bff0dd07f0e3aa415e014b8c6

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

require "spigot/version"
require "spigot/errors"

module Spigot
  autoload :Configuration, 'spigot/configuration'
  autoload :Translator,    'spigot/translator'
  autoload :Record,        'spigot/record'
  autoload :Base,          'spigot/base'
  autoload :ActiveRecord,  'spigot/active_record'
  autoload :Proxy,         'spigot/proxy'

  def self.config
    Configuration.instance
  end

  def self.configure
    yield config
  end

  def self.root
    File.expand_path('../..', __FILE__)
  end

  def self.logger
    @log ||= Spigot.config.logger || begin
      buffer = Logger.new(STDOUT)
      buffer.level = $0 == 'irb' ? Logger::DEBUG : Logger::INFO
      buffer.formatter = proc{|severity, datetime, progname, msg| "#{msg}\n"}
      buffer
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spigot-0.0.1 lib/spigot.rb