Class: OpenHAB::RSpec::Mocks::ThingHandlerFactory
- Inherits:
-
Object
- Object
- OpenHAB::RSpec::Mocks::ThingHandlerFactory
- Defined in:
- lib/openhab/rspec/mocks/thing_handler.rb
Instance Method Summary collapse
- #createHandler(thing) ⇒ Object
-
#initialize ⇒ ThingHandlerFactory
constructor
A new instance of ThingHandlerFactory.
- #supportsThingType(_type) ⇒ Object
Constructor Details
#initialize ⇒ ThingHandlerFactory
Returns a new instance of ThingHandlerFactory.
70 71 72 73 |
# File 'lib/openhab/rspec/mocks/thing_handler.rb', line 70 def initialize super activate(ComponentContext.instance) end |
Instance Method Details
#createHandler(thing) ⇒ Object
79 80 81 |
# File 'lib/openhab/rspec/mocks/thing_handler.rb', line 79 def createHandler(thing) ThingHandler.new(thing) end |
#supportsThingType(_type) ⇒ Object
75 76 77 |
# File 'lib/openhab/rspec/mocks/thing_handler.rb', line 75 def supportsThingType(_type) true end |