Module: JSI::Util::Private::Virtual Private

Defined in:
lib/jsi/util/private.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: InstantiationError

Instance Method Summary collapse

Instance Method Details

#initializeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

this virtual class is not intended to be instantiated except by its subclasses, which override #initialize

Raises:



186
187
188
189
190
# File 'lib/jsi/util/private.rb', line 186

def initialize
  # :nocov:
  raise(InstantiationError, "cannot instantiate virtual class #{self.class}")
  # :nocov:
end

#virtual_methodObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

virtual_method is used to indicate that the method calling it must be implemented on the (non-virtual) subclass

Raises:



193
194
195
196
197
# File 'lib/jsi/util/private.rb', line 193

def virtual_method
  # :nocov:
  raise(Bug, "class #{self.class} must implement #{caller_locations.first.label}")
  # :nocov:
end