Method: Nutella.execute_command
- Defined in:
- lib/core/nutella_core.rb
.execute_command(command, args = nil) ⇒ Object
This method executes a particular command
13 14 15 16 17 18 19 20 21 |
# File 'lib/core/nutella_core.rb', line 13 def Nutella.execute_command (command, args=nil) # Check that the command exists and if it does, # execute its run method passing the args parameters if command_exists?(command) Object::const_get("Nutella::#{command.capitalize}").new.run(args) else console.error "Unknown command #{command}" end end |