Class: Kuzya::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kuzya/commands/base.rb

Direct Known Subclasses

Add, Help, List, Open, Remove, Version

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.args_without_command(args) ⇒ Object



18
19
20
# File 'lib/kuzya/commands/base.rb', line 18

def args_without_command(args)
  args.dup.tap { |ary| ary.shift }
end

.call(args, config) ⇒ Object



9
10
11
# File 'lib/kuzya/commands/base.rb', line 9

def call(args, config)
  new(*prepare(args, config)).call
end

.infoObject

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/kuzya/commands/base.rb', line 5

def info
  raise NotImplementedError
end

.prepare(_args, _config) ⇒ Object

Returns array of arguments that will be passed to constructor

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/kuzya/commands/base.rb', line 14

def prepare(_args, _config)
  raise NotImplementedError
end

Instance Method Details

#callObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/kuzya/commands/base.rb', line 23

def call
  raise NotImplementedError
end