Module: JSI::Util::Virtual Private

Included in:
Validation::Result
Defined in:
lib/jsi/util.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:


204
205
206
207
208
# File 'lib/jsi/util.rb', line 204

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:


211
212
213
214
215
# File 'lib/jsi/util.rb', line 211

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