Exception: Toys::Settings::FieldError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/toys/settings.rb

Overview

Error raised when a value does not match the type constraint.

Instance Attribute Summary collapse

Instance Attribute Details

#field_nameSymbol (readonly)

The field that rejected the value

Returns:

  • (Symbol)


328
329
330
# File 'lib/toys/settings.rb', line 328

def field_name
  @field_name
end

#settings_classClass (readonly)

The settings class that rejected the value

Returns:

  • (Class)


322
323
324
# File 'lib/toys/settings.rb', line 322

def settings_class
  @settings_class
end

#type_descriptionString? (readonly)

A description of the type constraint, or nil if the field didn't exist.

Returns:

  • (String, nil)


334
335
336
# File 'lib/toys/settings.rb', line 334

def type_description
  @type_description
end

#valueObject (readonly)

The value that did not match

Returns:

  • (Object)


316
317
318
# File 'lib/toys/settings.rb', line 316

def value
  @value
end