Class: Docgenerator::Creole::Creole_inclusion_and_plugin
- Inherits:
-
Object
- Object
- Docgenerator::Creole::Creole_inclusion_and_plugin
- Defined in:
- lib/docgenerator/creole/inclusion_and_plugins.rb
Overview
Dummy class for all inclusions and plugins. Used to check the correct definition.
-
Inclusions are used later with {xx}
-
Plugins are used later with <<xx>>
Derived classes (Inclusions):
-
Creole_inclusion_img
-
Creole_inclusion_footnote_group
-
Creole_inclusion_footnote
Derived classes (Plugins):
-
Creole_default_plugin
-
Creole_plugin_ruby
-
Creole_plugin_ruby_raw
More subclasses may be possible.
Direct Known Subclasses
Docgenerator::Creole::Characters::Creole_gg, Docgenerator::Creole::Characters::Creole_gt, Docgenerator::Creole::Characters::Creole_ldots, Docgenerator::Creole::Characters::Creole_ll, Docgenerator::Creole::Characters::Creole_lt, Docgenerator::Creole::Characters::Creole_nil, Docgenerator::Creole::Characters::Creole_radic, Docgenerator::Creole::Characters::Creole_shy, Docgenerator::Creole::Characters::Creole_thinsp, Docgenerator::Creole::Characters::Creole_wbr, Inclusions::Creole_inclusion_img, Inclusions::Creole_short_html, Index::Creole_index, Index::Creole_printindex, Plugins::Creole_default_plugin, Plugins::Creole_footnote, Plugins::Creole_footnote_group, Plugins::Creole_plugin_ruby, Plugins::Creole_plugin_ruby_raw, Plugins::Creole_short_latex, Plugins::Creole_tikz, Todo::Creole_todo, Todo::Creole_todolist
Instance Attribute Summary collapse
-
#wiki ⇒ Object
readonly
Reader for the wiki.
Class Method Summary collapse
-
.set_inclusions_key(key) ⇒ Object
Define class as a Inclusion.
-
.set_plugin_key(key) ⇒ Object
Define class as a Plugin.
Instance Method Summary collapse
-
#initialize(inclusionname, description, options, wiki) ⇒ Creole_inclusion_and_plugin
constructor
Example: {inclusionname|description|option1=1,option2=2}.
Constructor Details
#initialize(inclusionname, description, options, wiki) ⇒ Creole_inclusion_and_plugin
Example:
{{inclusionname|description|option1=1,option2=2}}
Parameters:
-
inclusionname: Name of the inclusion (normally fix for an instance, unless e.g. Creole_inclusion_img)
-
description: First parameter of the plugin.
-
options: Array with the comma separated values. In the example:
['option1=1','option2=2']
-
wiki: creole-instance, where the plugin/inclusion is defined.
55 56 57 58 59 60 61 62 |
# File 'lib/docgenerator/creole/inclusion_and_plugins.rb', line 55 def initialize( inclusionname, description, , wiki ) @inclusionname = inclusionname @description = description @options = @wiki = wiki raise "Inclusion received no wiki but #{wiki.inspect}" unless wiki.is_a?(Creole) end |
Instance Attribute Details
#wiki ⇒ Object (readonly)
Reader for the wiki.
64 65 66 |
# File 'lib/docgenerator/creole/inclusion_and_plugins.rb', line 64 def wiki @wiki end |
Class Method Details
.set_inclusions_key(key) ⇒ Object
Define class as a Inclusion. You may use the class as:
{{key}}
75 76 77 |
# File 'lib/docgenerator/creole/inclusion_and_plugins.rb', line 75 def set_inclusions_key(key) Inclusions::Collection[key] = self end |
.set_plugin_key(key) ⇒ Object
Define class as a Plugin. You may use the class as:
<<key>>
83 84 85 |
# File 'lib/docgenerator/creole/inclusion_and_plugins.rb', line 83 def set_plugin_key(key) Plugins::Collection[key] = self end |