Method: Conify::Command#register_command

Defined in:
lib/conify/command.rb

#register_command(basename, action, command_class, global: false) ⇒ Object

register a command’s info to the @@commands map - utilized when calling ‘conify help`



277
278
279
280
281
282
283
# File 'lib/conify/command.rb', line 277

def register_command(basename, action, command_class, global: false)
  command = global ? action : (action == 'index' ? basename : "#{basename}:#{action}")

  command_info_module = command_class::CommandInfo.const_get(camelize(action))

  commands[command] = { description: command_description(command_info_module) }
end