MikutterPluginBase
Add new way to write mikutter plugin.
Installation
Add this line to your mikutter's Gemfile:
gem 'mikutter_plugin_base'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mikutter_plugin_base
Finally execute mikkuter with bundled gems:
$ bundle exec ruby mikkuter.rb
Usage
# path/to/mikutter/plugin/dir/sample.rb
require 'mikutter_plugin_base'
class Sample < Mikutter::PluginBase
def run(plugin)
"write your code here."
"you can access mikutter plugin api via `plugin`."
end
def on_update(service, )
"define mikutter event callbacks, hooks, filters as method."
"plugin base will automatically add them."
end
end
# at last of your plugin script do `resister!`
Sample.register!
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request