Module: Reforge::Transformation::Tree::AggregateNode::Factories
- Included in:
- Reforge::Transformation::Tree::AggregateNode
- Defined in:
- lib/reforge/transformation/tree/aggregate_node/factories.rb
Constant Summary collapse
- IMPLEMENTATION_FACTORIES =
{ Integer => -> { ArrayNode.new }, String => -> { HashNode.new }, Symbol => -> { HashNode.new } }.freeze
- IMPLEMENTATION_TYPES =
IMPLEMENTATION_FACTORIES.keys.freeze
Instance Method Summary collapse
Instance Method Details
#implementation_from(key_type) ⇒ Object
15 16 17 18 19 |
# File 'lib/reforge/transformation/tree/aggregate_node/factories.rb', line 15 def implementation_from(key_type) validate_key_type!(key_type) IMPLEMENTATION_FACTORIES[key_type].call end |