Class: RuboCop::Git::StyleGuide
- Inherits:
-
Object
- Object
- RuboCop::Git::StyleGuide
- Defined in:
- lib/rubocop/git/style_guide.rb
Overview
Instance Method Summary collapse
-
#initialize(rubocop_options, config_file, custom_config = nil) ⇒ StyleGuide
constructor
A new instance of StyleGuide.
- #inspect ⇒ Object
- #violations(file) ⇒ Object
Constructor Details
#initialize(rubocop_options, config_file, custom_config = nil) ⇒ StyleGuide
Returns a new instance of StyleGuide.
3 4 5 6 7 |
# File 'lib/rubocop/git/style_guide.rb', line 3 def initialize(, config_file, custom_config = nil) @rubocop_options = @config_file = config_file @custom_config = custom_config end |
Instance Method Details
#inspect ⇒ Object
20 21 22 |
# File 'lib/rubocop/git/style_guide.rb', line 20 def inspect "#<#{self.class.name}>" end |
#violations(file) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rubocop/git/style_guide.rb', line 9 def violations(file) if ignored_file?(file) [] else src = process_source(file) t_class = RuboCop::Cop::Team team = t_class.send(t_class.respond_to?(:mobilize) ? :mobilize : :new, enabled_cops, config, ) team.respond_to?(:investigate) ? team.investigate(src).offenses : team.inspect_file(src) end end |