Sha256: 6b0d7849c052a6b53922267d2c8eea0572bd0bad24cd9d3fce84ae699189e9a4

Contents?: true

Size: 474 Bytes

Versions: 5

Compression:

Stored size: 474 Bytes

Contents

require 'happymapper'
require 'active_support'
require "moysklad/version"
require 'logger'

module Moysklad
  mattr_accessor :custom_logger
  extend ActiveSupport::Autoload

  autoload :Entities
  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

5 entries across 5 versions & 1 rubygems

Version Path
moysklad-0.1.4 lib/moysklad.rb
moysklad-0.1.3 lib/moysklad.rb
moysklad-0.1.2 lib/moysklad.rb
moysklad-0.1.1 lib/moysklad.rb
moysklad-0.0.2 lib/moysklad.rb