Exception: Eddy::Errors::ElementNilValueError

Inherits:
ElementValidationError show all
Defined in:
lib/eddy/errors.rb

Overview

Exception raised when value has been called before value= and no default value is set.

Instance Attribute Summary

Attributes inherited from ElementValidationError

#arg, #element

Element Validation Errors collapse

Methods inherited from ElementValidationError

#element_description

Constructor Details

#initialize(msg = "", element:) ⇒ void

Parameters:



58
59
60
61
62
63
64
# File 'lib/eddy/errors.rb', line 58

def initialize(msg = "", element:)
  self.element = element
  if msg.length == 0
    msg << "This element requires a value but none was set."
  end
  super(msg)
end