# Contribute! These tools are designed to be easily extendable to handle any sort of functionality you need. ## Creating a New Controller Commands are processed by controllers, which call three class methods: `pre_exec`, `exec` then `post_exec`. The router looks for your handler in the `Granify::Controller` namespace (see [lib/controllers/open.rb](lib/controllers/open.rb) for an example). `pre_exec` and `post_exec` are mainly used by the base controller to execute predefined profiling and cleanup tasks. If you want to overwrite them in your controller, make sure you add `super` so it still calls the parent class method. |Handler method|Description| |--------------|-----------| |pre_exec|Designed to create shell script help text, can be used to run code before Controller::exec is executed.| |exec|Automatically executes the requested method, if it exists.| |post_exec|Execute post-run hooks. By default, old log files are deleted.|