Module: CultomePlayer::Plugins

Includes:
Help
Included in:
CultomePlayer
Defined in:
lib/cultome_player/plugins.rb,
lib/cultome_player/plugins/help.rb

Defined Under Namespace

Modules: Help

Instance Method Summary collapse

Methods included from Help

#command_help, #description_help, #sintaxis_help, #usage_help

Instance Method Details

#plugin_command_sintaxis(cmd_name) ⇒ Regex

Get a command format for a command implemented by a plugin

Parameters:

  • cmd_name (String)

    The command name.

Returns:

  • (Regex)

    The regex to validate a command format that is implemented by a plugin.



19
20
21
# File 'lib/cultome_player/plugins.rb', line 19

def plugin_command_sintaxis(cmd_name)
	return send("sintaxis_#{cmd_name}".to_sym)
end

#plugins_respond_to?(cmd_name) ⇒ Boolean

Check if a plugin implements the given command.

Parameters:

  • cmd_name (String)

    The command name.

Returns:

  • (Boolean)

    True is the given command is implemented by a plugin.



11
12
13
# File 'lib/cultome_player/plugins.rb', line 11

def plugins_respond_to?(cmd_name)
	return respond_to?("command_#{cmd_name}".to_sym)
end