Sha256: a1276e3538a3774ca783c967963366d65130947ae2f20a90fdc5655b77e287c1

Contents?: true

Size: 926 Bytes

Versions: 1

Compression:

Stored size: 926 Bytes

Contents

require 'forwardable'
require 'logger'
require 'arduino/library'

require 'arli/version'
require 'arli/errors'
require 'arli/logger'
require 'arli/config'

module Arli

  class << self
    attr_accessor :config
  end

  self.config = ::Arli::Config

  class << self
    extend Forwardable
    def_delegators :@config, *::Arli::Config::PARAMS

    def configure(&_block)
      yield(self.config)
    end

    def debug?
      self.debug
    end
  end
end

Arli.configure do |config|
  config.library_path       = ::Arduino::Library::DefaultDatabase.library_path
  config.library_index_path = ::Arduino::Library::DefaultDatabase.library_index_path
  config.library_index_url  = ::Arduino::Library::DefaultDatabase.library_index_url
  config.logger             = ::Logger.new(STDOUT, level: :info)
  config.debug              = ENV['ARLI_DEBUG'] || false
end

require 'arli/arli_file'
require 'arli/installer'
require 'arli/cli'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arli-0.5.1 lib/arli.rb