Sha256: ce6364df681ed0dad3afafa961fc09296cc24edfd09b3e225abdda456ea069d3

Contents?: true

Size: 499 Bytes

Versions: 55

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

class LoggerHelper
  class << self
    def determine_callers_name(sender_self)
      class_name = case sender_self
                   when String
                     sender_self
                   when Class
                     sender_self.name
                   when Module
                     sender_self.name
                   else # when class is singleton
                     sender_self.class.name
                   end
      class_name
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
facter-4.5.2 lib/facter/framework/logging/logger_helper.rb
facter-4.5.1 lib/facter/framework/logging/logger_helper.rb
facter-4.5.0 lib/facter/framework/logging/logger_helper.rb
facter-4.4.3 lib/facter/framework/logging/logger_helper.rb
facter-4.4.2 lib/facter/framework/logging/logger_helper.rb
facter-4.4.1 lib/facter/framework/logging/logger_helper.rb
facter-4.4.0 lib/facter/framework/logging/logger_helper.rb
facter-4.3.1 lib/facter/framework/logging/logger_helper.rb
facter-4.3.0 lib/facter/framework/logging/logger_helper.rb
facter-4.2.14 lib/facter/framework/logging/logger_helper.rb
facter-4.2.13 lib/facter/framework/logging/logger_helper.rb
facter-4.2.12 lib/facter/framework/logging/logger_helper.rb
facter-4.2.11 lib/facter/framework/logging/logger_helper.rb
facter-4.2.10 lib/facter/framework/logging/logger_helper.rb
facter-4.2.9 lib/facter/framework/logging/logger_helper.rb
facter-4.2.8 lib/facter/framework/logging/logger_helper.rb
facter-4.2.7 lib/facter/framework/logging/logger_helper.rb
facter-4.2.6 lib/facter/framework/logging/logger_helper.rb
facter-4.2.5 lib/facter/framework/logging/logger_helper.rb
facter-4.2.4 lib/facter/framework/logging/logger_helper.rb