Class: OpenHAB::DSL::Things::BridgeBuilder
- Inherits:
-
ThingBuilder
- Object
- ThingBuilder
- OpenHAB::DSL::Things::BridgeBuilder
- Defined in:
- lib/openhab/dsl/things/builder.rb
Overview
The BridgeBuilder DSL allows you to customize a thing
Instance Attribute Summary
Attributes inherited from ThingBuilder
#bridge_uid, #channels, #config, #enabled, #label, #location, #thing_type_uid, #uid
Instance Method Summary collapse
-
#bridge(*args, **kwargs, &block) ⇒ Object
Create a new Bridge with this Bridge as its Bridge.
-
#initialize(uid, label = nil, binding: nil, type: nil, bridge: nil, location: nil, config: {}, enabled: nil) ⇒ BridgeBuilder
constructor
Constructor for BridgeBuilder.
-
#thing(*args, **kwargs, &block) ⇒ Object
Create a new Thing with this Bridge as its Bridge.
Methods inherited from ThingBuilder
Constructor Details
#initialize(uid, label = nil, binding: nil, type: nil, bridge: nil, location: nil, config: {}, enabled: nil) ⇒ BridgeBuilder
Constructor for BridgeBuilder
283 284 285 286 |
# File 'lib/openhab/dsl/things/builder.rb', line 283 def initialize(uid, label = nil, binding: nil, type: nil, bridge: nil, location: nil, config: {}, enabled: nil) @builder = org.openhab.core.thing.binding.builder.BridgeBuilder super end |
Instance Method Details
#bridge(*args, **kwargs, &block) ⇒ Object
Create a new Bridge with this Bridge as its Bridge
290 291 292 |
# File 'lib/openhab/dsl/things/builder.rb', line 290 def bridge(*args, **kwargs, &block) parent_builder.bridge(*args, bridge: self, **kwargs, &block) end |
#thing(*args, **kwargs, &block) ⇒ Object
Create a new Thing with this Bridge as its Bridge
296 297 298 |
# File 'lib/openhab/dsl/things/builder.rb', line 296 def thing(*args, **kwargs, &block) parent_builder.thing(*args, bridge: self, **kwargs, &block) end |