Method: CommandKit::CommandName::ClassMethods#command_name

Defined in:
lib/command_kit/command_name.rb

#command_name(new_command_name = nil) ⇒ String

Derives the command name from the class name.



73
74
75
76
77
78
79
# 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