Installation
Constraint
- Each module's directory name MUST be same to module's $MODULE_ID.
- Module's directory can contain database definitions, dictionaries, templates and documents.
Module directory hierarchy
- $MODULE_ID/
- interface.rb - Interface to use module. It will be described later.
- def/
- db/
- def.schema - Default database definitions.
- upgrade$FROM_$TO.schema - Schema to upgrade database version from $FROM to $TO. Actually, this does not work yet.
- db/
-
dict/
- $LANG_KEY.rb - Dictionary for one language which is specified by $LANG_KEY.
- doc/ - Documentation for module.
- template/ - Template for module.
Interface
interface.rb specification.
- It MUST contain a class named $MODULE_ID.
- The class MUST be in module Cassiopeia::Module.
-
Module MUST have at least following methods.
-
def initialize(admin)
Constructor.
Arguments
Variable Description admin The module is used by administration CGI or not. -
def module_id()
return $MODULE_ID.
-
def db_version()
Version of database. Can be nil.
-
def sym_module_name()
Translating symbol of module name.
-
def sym_module_description()
Translating symbol of module description.
-
Specific modules
Some set of modules can be used for particular purpose.
- Payment module: to provide specific payment operations: payment specific data storing, online transfer, fee configuration and so on.