YUKI Hiroshi
null+****@clear*****
Fri Feb 7 17:02:39 JST 2014
YUKI Hiroshi 2014-02-07 17:02:39 +0900 (Fri, 07 Feb 2014) New Revision: ab1b050b6b5e186ed5821e4d11211cf22dca3c76 https://github.com/droonga/droonga.org/commit/ab1b050b6b5e186ed5821e4d11211cf22dca3c76 Message: Update plugin definition example for the latest (paper) spec Modified files: tutorial/plugin-development/adapter/index.md Modified: tutorial/plugin-development/adapter/index.md (+11 -5) =================================================================== --- tutorial/plugin-development/adapter/index.md 2014-02-07 16:40:41 +0900 (6ded597) +++ tutorial/plugin-development/adapter/index.md 2014-02-07 17:02:39 +0900 (9e05391) @@ -48,20 +48,26 @@ engine ### Create a plugin -Put a plugin code into `input_adapter` directory. +Put a plugin code into a file `store_search.rb` in the `plugin` directory. -lib/droonga/plugin/input_adapter/example.rb: +lib/droonga/plugin/store_search.rb: ~~~ruby -module Droonga - class ExampleInputAdapterPlugin < Droonga::InputAdapterPlugin - repository.register("example", self) +module StoreSearchPlugin + Plugin.repository.register("store-search", self) + + class Adapter < Droonga::Adapter + # You'll put codes to modify messages here. end end ~~~ This plugin does nothing except registering itself to Droonga. + * The `store-search` is the name of the plugin itself. You'll use it in your `catalog.json`, to activate the plugin. + * As the example above, you must define your plugin as a module. + + ### Activate plugin with `catalog.json` You need to update `catalog.json` to activate your plugin. -------------- next part -------------- HTML����������������������������...Download