Sha256: 7cc0425858282760cad1dcb5c10b00acca0cc132b6ca4b723061eae2e1102a99
Contents?: true
Size: 506 Bytes
Versions: 31
Compression:
Stored size: 506 Bytes
Contents
module SSHKit class DeprecationLogger def initialize(out) @out = out @previous_warnings = Set.new end def log(message) return if @out.nil? warning_msg = "[Deprecated] #{message}\n" caller_line = caller.find { |line| !line.include?('lib/sshkit') } warning_msg << " (Called from #{caller_line})\n" unless caller_line.nil? @out << warning_msg unless @previous_warnings.include?(warning_msg) @previous_warnings << warning_msg end end end
Version data entries
31 entries across 31 versions & 2 rubygems