Class: Appydave::Tools::Jump::Commands::Base
- Inherits:
-
Object
- Object
- Appydave::Tools::Jump::Commands::Base
- Defined in:
- lib/appydave/tools/jump/commands/base.rb
Overview
Base command class for Jump CLI commands
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path_validator ⇒ Object
readonly
Returns the value of attribute path_validator.
Instance Method Summary collapse
-
#initialize(config, path_validator: PathValidator.new, **options) ⇒ Base
constructor
A new instance of Base.
-
#run ⇒ Hash
Execute the command.
Constructor Details
#initialize(config, path_validator: PathValidator.new, **options) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 |
# File 'lib/appydave/tools/jump/commands/base.rb', line 11 def initialize(config, path_validator: PathValidator.new, **) @config = config @path_validator = path_validator = end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/appydave/tools/jump/commands/base.rb', line 9 def config @config end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/appydave/tools/jump/commands/base.rb', line 9 def end |
#path_validator ⇒ Object (readonly)
Returns the value of attribute path_validator.
9 10 11 |
# File 'lib/appydave/tools/jump/commands/base.rb', line 9 def path_validator @path_validator end |
Instance Method Details
#run ⇒ Hash
Execute the command
20 21 22 |
# File 'lib/appydave/tools/jump/commands/base.rb', line 20 def run raise NotImplementedError, 'Subclasses must implement #run' end |