Module: DeviceMap::DeviceData::Builder
- Defined in:
- lib/device_map/device_data/builder.rb
Defined Under Namespace
Classes: BuilderNotFound, Simple, TwoStep
Constant Summary collapse
- SIMPLE_BUILDER =
Creates OR patterns with normal priority
Simple.new(1)
- GENERIC_BUILDER =
Creates OR patterns with lower priority
Simple.new(0)
- TWO_STEP_BUILDER =
Creates AND patterns with normal priority
TwoStep.new(1)
Class Method Summary collapse
Class Method Details
.find(builder_node_class) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/device_map/device_data/builder.rb', line 7 def find(builder_node_class) builders.fetch(builder_node_class) do fail BuilderNotFound, "Could not find builder for #{builder_node_class}" end end |
.register(klass, builder_class) ⇒ Object
14 15 16 |
# File 'lib/device_map/device_data/builder.rb', line 14 def register(klass, builder_class) builders[builder_class] = klass end |