Module: CommandKit::CommandName::ClassMethods
- Defined in:
- lib/command_kit/command_name.rb
Overview
Defines class-level methods.
Instance Method Summary collapse
-
#command_name(new_command_name = nil) ⇒ String
Derives the command name from the class name.
Instance Method Details
#command_name(new_command_name = nil) ⇒ String
Derives the command name from the class name.
75 76 77 78 79 80 81 |
# File 'lib/command_kit/command_name.rb', line 75 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 |