Module: RBS
Constant Summary
-
VERSION =
# File 'lib/rbs/version.rb', line 4"2.7.0"
Class Attribute Summary
Class Method Summary
Class Attribute Details
.logger_level (rw)
[ GitHub ]# File 'lib/rbs.rb', line 60
attr_reader :logger_level
.logger_level=(level) (rw)
[ GitHub ]# File 'lib/rbs.rb', line 72
def logger_level=(level) @logger_level = level @logger = nil end
.logger_output (rw)
[ GitHub ]# File 'lib/rbs.rb', line 61
attr_reader :logger_output
.logger_output=(val) (rw)
[ GitHub ]# File 'lib/rbs.rb', line 67
def logger_output=(val) @logger = nil @logger_output = val end
Class Method Details
.logger
[ GitHub ]# File 'lib/rbs.rb', line 63
def logger @logger ||= Logger.new(logger_output || STDERR, level: logger_level || Logger::WARN, progname: "rbs") end
.print_warning
[ GitHub ]# File 'lib/rbs.rb', line 77
def print_warning() @warnings ||= Set[] = yield() unless @warnings.include?( ) @warnings << logger.warn { } end end