Module: RuboCop::Yast
- Defined in:
- lib/rubocop/yast/logger.rb,
lib/rubocop/yast/config.rb,
lib/rubocop/yast/version.rb,
lib/rubocop/yast/reformatter.rb,
lib/rubocop/yast/node_helpers.rb,
lib/rubocop/yast/builtins/time.rb,
lib/rubocop/yast/builtins/y2log.rb,
lib/rubocop/yast/builtins/getenv.rb,
lib/rubocop/yast/builtins/builtin.rb,
lib/rubocop/yast/track_variable_scope.rb
Overview
Yast plugin settings
Defined Under Namespace
Modules: Builtins, Config, NodeHelpers, Reformatter, TrackVariableScope
Constant Summary collapse
- VERSION =
"0.0.9"
Class Method Summary collapse
Class Method Details
.backtrace(skip_frames: 0) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubocop/yast/logger.rb', line 16 def backtrace(skip_frames: 0) c = caller lines = [] c.reverse.drop(skip_frames).each_with_index do |frame, i| lines << "#{i}: #{frame}" end lines.reverse_each do |l| puts l end end |
.logger ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/rubocop/yast/logger.rb', line 6 def logger return @logger if @logger @logger = ::Logger.new(STDERR) @logger.level = ::Logger::WARN @logger.level = ::Logger::DEBUG if $DEBUG @logger end |