Class: Rubycritic::Command::Ci
- Inherits:
-
Object
- Object
- Rubycritic::Command::Ci
- Defined in:
- lib/rubycritic/commands/ci.rb
Instance Method Summary collapse
- #critique(paths) ⇒ Object
- #execute ⇒ Object
-
#initialize(options) ⇒ Ci
constructor
A new instance of Ci.
- #report ⇒ Object
Constructor Details
#initialize(options) ⇒ Ci
Returns a new instance of Ci.
8 9 10 11 |
# File 'lib/rubycritic/commands/ci.rb', line 8 def initialize() @paths = [:paths] Config.source_control_system = SourceControlSystem::Base.create end |
Instance Method Details
#critique(paths) ⇒ Object
18 19 20 |
# File 'lib/rubycritic/commands/ci.rb', line 18 def critique(paths) @analysed_modules = AnalysersRunner.new(paths).run end |
#execute ⇒ Object
13 14 15 16 |
# File 'lib/rubycritic/commands/ci.rb', line 13 def execute critique(@paths) report end |
#report ⇒ Object
22 23 24 25 |
# File 'lib/rubycritic/commands/ci.rb', line 22 def report report_location = Reporter::Main.new(@analysed_modules).generate_report puts "New critique at #{report_location}" end |