Sha256: e8332ee29ab85a368cd7ba1517a72938d65b6bc218262007ea43d33ef0fff482

Contents?: true

Size: 298 Bytes

Versions: 35

Compression:

Stored size: 298 Bytes

Contents

class LoggerFactory
  include SmartIoC::Iocify

  class SmartIoCLogger
  end

  class SimpleLogger
  end

  bean :logger, factory_method: :get_logger

  inject :config

  def get_logger
    if config.app_name == 'SmartIoC'
      SmartIoCLogger.new
    else
      SimpleLogger.new
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
smart_ioc-0.5.2 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.5.1 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.5.0 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.9 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.4.0 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.8 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.7 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.6 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.5 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.2 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.1 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.3.0 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.5 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.4 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.3 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.2 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.1 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.2.0 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.1.30 spec/smart_ioc/example/utils/logger.rb
smart_ioc-0.1.29 spec/smart_ioc/example/utils/logger.rb