Class: Packwerk::Commands::BaseCommand Abstract
- Inherits:
-
Object
- Object
- Packwerk::Commands::BaseCommand
- Defined in:
- lib/packwerk/commands/base_command.rb
Overview
This class is abstract.
Direct Known Subclasses
CheckCommand, HelpCommand, InitCommand, UpdateTodoCommand, ValidateCommand, VersionCommand
Class Method Summary collapse
-
.description(description = nil) ⇒ Object
: (?String? description) -> String.
Instance Method Summary collapse
-
#initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:) ⇒ BaseCommand
constructor
: ( | Array args, | configuration: Configuration, | out: (StringIO | IO), | err_out: (StringIO | IO), | progress_formatter: Formatters::ProgressFormatter, | offenses_formatter: OffensesFormatter | ) -> void.
-
#run ⇒ Object
abstract
: -> bool.
Constructor Details
#initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:) ⇒ BaseCommand
: ( | Array args, | configuration: Configuration, | out: (StringIO | IO), | err_out: (StringIO | IO), | progress_formatter: Formatters::ProgressFormatter, | offenses_formatter: OffensesFormatter | ) -> void
29 30 31 32 33 34 35 36 |
# File 'lib/packwerk/commands/base_command.rb', line 29 def initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:) @args = args @configuration = configuration @out = out @err_out = err_out @progress_formatter = progress_formatter @offenses_formatter = offenses_formatter end |
Class Method Details
.description(description = nil) ⇒ Object
: (?String? description) -> String
12 13 14 15 16 17 18 |
# File 'lib/packwerk/commands/base_command.rb', line 12 def description(description = nil) if description @description = description else @description end end |
Instance Method Details
#run ⇒ Object
This method is abstract.
: -> bool
40 |
# File 'lib/packwerk/commands/base_command.rb', line 40 def run = raise NotImplementedError, "Abstract method called" |