class Rubysmith::Builders::Rubocop::Formatter
Executes Rubocop
auto-correct on newly generated project.
Public Class Methods
call(...)
click to toggle source
# File lib/rubysmith/builders/rubocop/formatter.rb, line 13 def self.call(...) = new(...).call def initialize configuration, client: RuboCop::CLI.new @configuration = configuration @client = client end def call STDOUT.squelch { client.run ["--auto-correct", configuration.project_root.to_s] } nil end private attr_reader :configuration, :client end
new(configuration, client: RuboCop::CLI.new)
click to toggle source
# File lib/rubysmith/builders/rubocop/formatter.rb, line 15 def initialize configuration, client: RuboCop::CLI.new @configuration = configuration @client = client end
Public Instance Methods
call()
click to toggle source
# File lib/rubysmith/builders/rubocop/formatter.rb, line 20 def call STDOUT.squelch { client.run ["--auto-correct", configuration.project_root.to_s] } nil end