Class: OpenHAB::DSL::Things::BridgeBuilder

Inherits:
ThingBuilder show all
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

Methods inherited from ThingBuilder

#channel

Constructor Details

#initialize(uid, label = nil, binding: nil, type: nil, bridge: nil, location: nil, config: {}, enabled: nil) ⇒ BridgeBuilder

Constructor for BridgeBuilder



280
281
282
283
# File 'lib/openhab/dsl/things/builder.rb', line 280

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

#bridgeObject

Create a new Bridge with this Bridge as its Bridge

See Also:



287
288
289
# File 'lib/openhab/dsl/things/builder.rb', line 287

def bridge(*, **, &)
  parent_builder.bridge(*, bridge: self, **, &)
end

#thingObject

Create a new Thing with this Bridge as its Bridge



293
294
295
# File 'lib/openhab/dsl/things/builder.rb', line 293

def thing(*, **, &)
  parent_builder.thing(*, bridge: self, **, &)
end