Exception: Prefab::Errors::MissingDefaultError

Inherits:
Prefab::Error
  • Object
show all
Defined in:
lib/prefab/errors/missing_default_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ MissingDefaultError

Returns a new instance of MissingDefaultError.



6
7
8
9
10
# File 'lib/prefab/errors/missing_default_error.rb', line 6

def initialize(key)
  message = "No value found for key '#{key}' and no default was provided.\n\nIf you'd prefer returning `nil` rather than raising when this occurs, modify the `on_no_default` value you provide in your Prefab::Options."

  super(message)
end