Class: Appydave::Tools::Jump::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/appydave/tools/jump/commands/base.rb

Overview

Base command class for Jump CLI commands

Direct Known Subclasses

Add, Generate, Remove, Report, Update, Validate

Instance Attribute Summary collapse

Instance Method Summary collapse

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, **options)
  @config = config
  @path_validator = path_validator
  @options = options
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



9
10
11
# File 'lib/appydave/tools/jump/commands/base.rb', line 9

def config
  @config
end

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/appydave/tools/jump/commands/base.rb', line 9

def options
  @options
end

#path_validatorObject (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

#runHash

Execute the command

Returns:

  • (Hash)

    Result hash with success status

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/appydave/tools/jump/commands/base.rb', line 20

def run
  raise NotImplementedError, 'Subclasses must implement #run'
end