Module: Commands::CommandMixin::ClassMethods

Defined in:
lib/gdsh/command_mixin.rb

Overview

Every ‘useful’ Command class should override the following (except terminal?)

Instance Method Summary collapse

Instance Method Details

#command_nameObject



24
25
26
# File 'lib/gdsh/command_mixin.rb', line 24

def command_name
  ''
end

#descriptionObject



36
37
38
39
# File 'lib/gdsh/command_mixin.rb', line 36

def description
  (command_name + parameters + ":\n  ").colorize(:green) + 
  function.colorize(:yellow)
end

#functionObject



28
29
30
# File 'lib/gdsh/command_mixin.rb', line 28

def function
  ''
end

#parametersObject



32
33
34
# File 'lib/gdsh/command_mixin.rb', line 32

def parameters
  ''
end

#terminal?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/gdsh/command_mixin.rb', line 41

def terminal?
  false
end