module CommandKit::CommandName::ClassMethods
Defines class-level methods.
Public Instance Methods
command_name(new_command_name=nil)
click to toggle source
Derives the command name from the class name.
@param [String, nil] new_command_name
If given a command name argument, it will override the derived command name.
@return [String]
@api public
# File lib/command_kit/command_name.rb, line 73 def command_name(new_command_name=nil) if new_command_name @command_name = new_command_name.to_s else @command_name || Inflector.underscore(Inflector.demodularize(name)) end end