Class: Rfix::CLI::Command::Config

Inherits:
RuboCop::CommentConfig show all
Includes:
Log
Defined in:
lib/rfix/cli/command/config.rb

Instance Method Summary collapse

Methods included from Log

prompt, say, say!

Constructor Details

#initialize(rfix, *rest) ⇒ Config

Returns a new instance of Config.



9
10
11
12
# File 'lib/rfix/cli/command/config.rb', line 9

def initialize(rfix, *rest)
  super(*rest)
  @rfix = rfix
end

Instance Method Details

#cop_enabled_at_line?(_, line) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/rfix/cli/command/config.rb', line 14

def cop_enabled_at_line?(_, line)
  @rfix.include?(processed_source.file_path, line) && super
rescue StandardError => e
  puts e.message
end