Class: RSpec::OpenHAB::Core::Mocks::ThingHandlerFactory
- Inherits:
-
Object
- Object
- RSpec::OpenHAB::Core::Mocks::ThingHandlerFactory
- Includes:
- Singleton
- Defined in:
- lib/rspec/openhab/core/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.
60 61 62 63 |
# File 'lib/rspec/openhab/core/mocks/thing_handler.rb', line 60 def initialize super activate(ComponentContext.instance) end |
Instance Method Details
#createHandler(thing) ⇒ Object
69 70 71 |
# File 'lib/rspec/openhab/core/mocks/thing_handler.rb', line 69 def createHandler(thing) ThingHandler.new(thing) end |
#supportsThingType(_type) ⇒ Object
65 66 67 |
# File 'lib/rspec/openhab/core/mocks/thing_handler.rb', line 65 def supportsThingType(_type) true end |