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:



46
47
48
49
50
51
52
# File 'lib/eddy/errors.rb', line 46

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