Sha256: 8fd57670d393b95bbea0724c164c6f07f673e6e59011a23f3ea1cc8237e277d8

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 Bytes

Contents

require 'virtus'
require 'active_support'
require "moysklad/version"

require 'logger'

module Moysklad
  mattr_accessor :custom_logger
  extend ActiveSupport::Autoload

  require_relative 'moysklad/entities'
  autoload :Error
  autoload :Resources
  autoload :Client
  autoload :Universe

  def self.logger= value
    self.custom_logger = value
  end

  def self.logger
    return custom_logger if custom_logger

    if defined? Rails
      Rails.logger
    else
      Logger.new STDERR
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moysklad-0.3.0 lib/moysklad.rb