Class: RuboBot::Bot
- Inherits:
-
Object
- Object
- RuboBot::Bot
- Defined in:
- lib/rubobot/bot.rb
Overview
Run rubobot
Instance Method Summary collapse
- #autocorrect(paths) ⇒ Object
-
#initialize(configuration = Configuration.new) ⇒ Bot
constructor
A new instance of Bot.
Constructor Details
#initialize(configuration = Configuration.new) ⇒ Bot
Returns a new instance of Bot.
6 7 8 |
# File 'lib/rubobot/bot.rb', line 6 def initialize(configuration = Configuration.new) @configuration = configuration end |
Instance Method Details
#autocorrect(paths) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rubobot/bot.rb', line 10 def autocorrect(paths) loop do ac = RuboBot::RuboCop::AutoCorrect.new(next_cop(paths), paths) if ac.run configuration.stdout.puts(ac.) break end end end |