Method: Faulty.default

Defined in:
lib/faulty.rb

.defaultFaulty?

Get the default instance given during init

Returns:

  • (Faulty, nil)

    The default instance if it is registered

Raises:


58
59
60
61
62
63
# File 'lib/faulty.rb', line 58

def default
  raise UninitializedError unless @instances
  raise MissingDefaultInstanceError unless @default_instance

  self[@default_instance]
end