Module: Copland::ConfigurationPoint
- Defined in:
- lib/copland/configuration-point/map.rb,
lib/copland/configuration-point/list.rb,
lib/copland/configuration-point/common.rb,
lib/copland/configuration-point/errors.rb
Defined Under Namespace
Modules: ConfigurationPointFunctionality Classes: ContributionTypeMismatch, ListConfigurationPoint, MapConfigurationPoint
Constant Summary collapse
- POOL_NAME =
The pool name for all configuration point implementations. (See Copland::ClassFactory)
"configuration-point"
Class Method Summary collapse
-
.register(name, klass) ⇒ Object
Register the given class “
klass
” with the ClassFactory, with the given name.
Class Method Details
.register(name, klass) ⇒ Object
Register the given class “klass
” with the ClassFactory, with the given name. This will also create a new method on the class, called “type”, which returns name
.
54 55 56 57 58 59 60 61 |
# File 'lib/copland/configuration-point/common.rb', line 54 def register( name, klass ) klass.class_eval <<-EOF def type #{name.inspect} end EOF Copland::ClassFactory.instance.register( POOL_NAME, name, klass ) end |