Class: HybridForest::Forests::GrowerFactory
- Inherits:
-
Object
- Object
- HybridForest::Forests::GrowerFactory
- Defined in:
- lib/hybridforest/forests/grower_factory.rb
Constant Summary collapse
- TYPES =
{ cart: HybridForest::Forests::ForestGrowers::CARTGrower, id3: HybridForest::Forests::ForestGrowers::ID3Grower, hybrid: HybridForest::Forests::ForestGrowers::HybridGrower }.freeze
Class Method Summary collapse
Class Method Details
.default ⇒ Object
19 20 21 |
# File 'lib/hybridforest/forests/grower_factory.rb', line 19 def default HybridForest::Forests::ForestGrowers::HybridGrower end |
.for(type) ⇒ Object
15 16 17 |
# File 'lib/hybridforest/forests/grower_factory.rb', line 15 def for(type) (TYPES[type] || default).new end |
.types ⇒ Object
23 24 25 |
# File 'lib/hybridforest/forests/grower_factory.rb', line 23 def types TYPES.keys end |