Class: RSpec::OpenHAB::Core::Mocks::ThingHandlerFactory

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rspec/openhab/core/mocks/thing_handler.rb

Instance Method Summary collapse

Constructor Details

#initializeThingHandlerFactory

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