Sha256: 74ded93511a42a049fd62b7cb66aff194b6a9cddf53f53a72f2194d199b22904

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

require 'arli/version'
require 'arli/cli'
require 'logger'

module Arli
  DEFAULT_JSON_FILE_ENV = 'ARDUINO_ARLI_LIBRARY_FILE'.freeze
  DEFAULT_JSON_FILE     = ENV[DEFAULT_JSON_FILE_ENV] || 'arli.json'.freeze

  DEFAULT_LIBRARY_PATH_ENV = 'ARDUINO_CUSTOM_LIBRARY_PATH'.freeze
  DEFAULT_LIBRARY_PATH     = ENV[DEFAULT_LIBRARY_PATH_ENV] || (ENV['HOME'] + '/Documents/Arduino/Libraries')

  DEBUG = ENV['DEBUG'] ? true : false

  @logger       = Logger.new(STDOUT)
  @logger.level = Logger::INFO

  class << self
    attr_accessor :logger

    %i(debug info error warn fatal).each do |level|
      define_method level do |*args|
        self.logger.send(level, *args) if self.logger
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arli-0.2.2 lib/arli.rb