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

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

Instance Method Summary collapse

Constructor Details

#initializeThingHandlerFactory

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