Method: CodeRay::PluginHost#register
- Defined in:
- lib/coderay/helpers/plugin.rb
#register(plugin, *ids) ⇒ Object
Every plugin must register itself for one or more ids by calling register_for, which calls this method.
See Plugin#register_for.
149 150 151 152 153 154 155 156 157 |
# File 'lib/coderay/helpers/plugin.rb', line 149 def register plugin, *ids for id in ids unless id.is_a? Symbol raise ArgumentError, "id must be a Symbol, but it was a #{id.class}" end plugin_hash[validate_id(id)] = plugin end end |