Class: OpenHAB::RSpec::Mocks::AbstractStorageBasedTypeProviderWrappedStorageService

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

Instance Method Summary collapse

Constructor Details

#initialize(parent, ruby_klass, java_klass) ⇒ AbstractStorageBasedTypeProviderWrappedStorageService

Returns a new instance of AbstractStorageBasedTypeProviderWrappedStorageService.



12
13
14
15
16
# File 'lib/openhab/rspec/mocks/abstract_storage_based_type_provider_wrapped_storage_service.rb', line 12

def initialize(parent, ruby_klass, java_klass)
  super(parent)
  @ruby_klass = ruby_klass
  @java_klass = java_klass
end

Instance Method Details

#getStorage(name, _class_loader) ⇒ Object

rubocop:disable Naming/MethodName



18
19
20
# File 'lib/openhab/rspec/mocks/abstract_storage_based_type_provider_wrapped_storage_service.rb', line 18

def getStorage(name, _class_loader) # rubocop:disable Naming/MethodName
  super(name.sub(@ruby_klass.name, @java_klass.name), @java_klass.class_loader)
end