Class: Rubysmith::Extensions::Rubocop
- Inherits:
-
Object
- Object
- Rubysmith::Extensions::Rubocop
- Defined in:
- lib/rubysmith/extensions/rubocop.rb
Overview
Ensures project skeleton adheres to style guide.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, client: ::RuboCop::CLI.new) ⇒ Rubocop
constructor
A new instance of Rubocop.
Constructor Details
#initialize(configuration, client: ::RuboCop::CLI.new) ⇒ Rubocop
Returns a new instance of Rubocop.
14 15 16 17 |
# File 'lib/rubysmith/extensions/rubocop.rb', line 14 def initialize configuration, client: ::RuboCop::CLI.new @configuration = configuration @client = client end |
Class Method Details
.call ⇒ Object
12 |
# File 'lib/rubysmith/extensions/rubocop.rb', line 12 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
19 20 21 22 |
# File 'lib/rubysmith/extensions/rubocop.rb', line 19 def call STDOUT.squelch { client.run ["--autocorrect-all", configuration.project_root.to_s] } configuration end |