Sha256: af027aaec359546cf7f3e6ff81e803e8fc09102dd1526e455f2c4b6ed56fa759

Contents?: true

Size: 639 Bytes

Versions: 7

Compression:

Stored size: 639 Bytes

Contents

module IEX
  module Api
    module Config
      module Logger
        ATTRIBUTES = %i[
          instance
          options
          proc
        ].freeze

        class << self
          attr_accessor(*ATTRIBUTES)

          def reset!
            self.instance = nil
            self.options = {}
            self.proc = nil
          end
        end

        module Accessor
          def logger
            block_given? ? yield(Config::Logger) : Config::Logger
          end

          def logger=(instance)
            logger.instance = instance
          end
        end
      end
    end
  end
end

IEX::Api::Config::Logger.reset!

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iex-ruby-client-2.1.0 lib/iex/api/config/logger.rb
iex-ruby-client-2.0.0 lib/iex/api/config/logger.rb
iex-ruby-client-1.6.0 lib/iex/api/config/logger.rb
iex-ruby-client-1.5.0 lib/iex/api/config/logger.rb
iex-ruby-client-1.4.1 lib/iex/api/config/logger.rb
iex-ruby-client-1.4.0 lib/iex/api/config/logger.rb
iex-ruby-client-1.3.0 lib/iex/api/config/logger.rb