Sha256: ade20e5c0406ffb2fc29ee6daae70b601ac2c68f860f3512abf54a814864f6ec

Contents?: true

Size: 676 Bytes

Versions: 19

Compression:

Stored size: 676 Bytes

Contents

module Timber
  # Base class for `Timber::Integrations::*`.
  #
  # @private
  class Integrator
    class RequirementNotMetError < StandardError; end

    class << self
      def integrate!(*args)
        new(*args).integrate!
        Config.instance.debug_logger.debug("Integrated #{name}") if Config.instance.debug_logger
        true
      # RequirementUnsatisfiedError is the only silent failure we support
      rescue RequirementNotMetError => e
        Config.instance.debug_logger.debug("Failed integrating #{name}: #{e.message}") if Config.instance.debug_logger
        false
      end
    end

    def integrate!
      raise NotImplementedError.new
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
timber-2.0.20 lib/timber/integrator.rb
timber-2.0.19 lib/timber/integrator.rb
timber-2.0.17 lib/timber/integrator.rb
timber-2.0.16 lib/timber/integrator.rb
timber-2.0.15 lib/timber/integrator.rb
timber-2.0.14 lib/timber/integrator.rb
timber-2.0.12 lib/timber/integrator.rb
timber-2.0.11 lib/timber/integrator.rb
timber-2.0.10 lib/timber/integrator.rb
timber-2.0.9 lib/timber/integrator.rb
timber-2.0.8 lib/timber/integrator.rb
timber-2.0.7 lib/timber/integrator.rb
timber-2.0.6 lib/timber/integrator.rb
timber-2.0.5 lib/timber/integrator.rb
timber-2.0.4 lib/timber/integrator.rb
timber-2.0.3 lib/timber/integrator.rb
timber-2.0.2 lib/timber/integrator.rb
timber-2.0.1 lib/timber/integrator.rb
timber-2.0.0 lib/timber/integrator.rb