Sha256: 15f5ea4b3deff6d0f49cc1c73825568104a88de4e64028123628f816597758cf

Contents?: true

Size: 949 Bytes

Versions: 1

Compression:

Stored size: 949 Bytes

Contents

# 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.|

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbtils-0.0.2 CONTRIBUTE.md