Sha256: 065638c82dfa48a8110655f105943c9880844d437591703a1298d24b0339ab55
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true module MrLogaLoga # == Description # # Instance methods to be attached when including the main module. # # @api private module InstanceMethods def loga_context { class_name: self.class.name } end def logger if loga_loga.is_a?(MrLogaLoga::Logger) MrLogaLoga::LoggerProxy.new(loga_loga, -> { loga_context }) else loga_loga end end def loga_loga @loga_loga ||= if defined?(Rails.logger) Rails.logger else MrLogaLoga.configuration.logger end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mr_loga_loga-0.1.2 | lib/mr_loga_loga/instance_methods.rb |