Class: RubynCode::CLI::Commands::ChiselReview

Inherits:
Base
  • Object
show all
Defined in:
lib/rubyn_code/cli/commands/chisel_review.rb

Overview

‘/chisel-review` — audit the current branch’s changes for over-engineering and report a ranked deletion list. Read-only.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

aliases, all_names, hidden?

Class Method Details

.command_nameObject



9
# File 'lib/rubyn_code/cli/commands/chisel_review.rb', line 9

def self.command_name = '/chisel-review'

.descriptionObject



10
# File 'lib/rubyn_code/cli/commands/chisel_review.rb', line 10

def self.description = 'Find over-engineering in the current diff (/chisel-review [base])'

Instance Method Details

#execute(args, ctx) ⇒ Object



12
13
14
15
# File 'lib/rubyn_code/cli/commands/chisel_review.rb', line 12

def execute(args, ctx)
  # Inspection owns the 'main' default so it lives in exactly one place.
  ctx.send_message(RubynCode::Chisel::Inspection.prompt(scope: :diff, target: args.first))
end