Class: OpenHAB::Core::ItemProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/openhab/core/item_proxy.rb

Class Method Summary collapse

Class Method Details

.new(item) ⇒ Object

ensure each item only has a single proxy, so that expect(item).to receive(:method) works



11
12
13
14
15
# File 'lib/rspec/openhab/core/item_proxy.rb', line 11

def new(item)
  @proxies.fetch(item.name) do
    @proxies[item.name] = super
  end
end