Exception: Optionoids::Errors::UnexpectedBlankValue

Inherits:
StandardError
  • Object
show all
Defined in:
lib/optionoids/errors.rb

Overview

Custom error class to indicate that some values ate unexpectedly blank or nil

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, keys: []) ⇒ UnexpectedBlankValue

Returns a new instance of UnexpectedBlankValue.



46
47
48
49
50
# File 'lib/optionoids/errors.rb', line 46

def initialize(message = nil, keys: [])
  @keys = keys
  msg = message || "Unexpected blank values for keys: #{keys.to_sentence}"
  super(msg)
end

Instance Attribute Details

#keysObject (readonly)

Returns the value of attribute keys.



44
45
46
# File 'lib/optionoids/errors.rb', line 44

def keys
  @keys
end