Class: Mv::Core::Constraint::Factory
- Inherits:
-
Object
- Object
- Mv::Core::Constraint::Factory
- Includes:
- Singleton
- Defined in:
- lib/mv/core/constraint/factory.rb
Instance Method Summary collapse
Instance Method Details
#create_constraint(description) ⇒ Object
10 11 12 |
# File 'lib/mv/core/constraint/factory.rb', line 10 def create_constraint description factory_map[description.type.to_sym].new(description) end |
#register_constraint(type, klass) ⇒ Object
14 15 16 |
# File 'lib/mv/core/constraint/factory.rb', line 14 def register_constraint type, klass factory_map[type.to_sym] = klass end |