Exception: Rapid::InvalidSettingError

Inherits:
SettingLoadError show all
Defined in:
lib/rapid/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(setting, value) ⇒ InvalidSettingError

Returns a new instance of InvalidSettingError.



26
27
28
29
30
# File 'lib/rapid/error.rb', line 26

def initialize setting, value
  @setting = setting
  @value = value
  super "Can't assign #{value.inspect} to #{setting.full_name}"
end

Instance Attribute Details

#settingObject (readonly)

Returns the value of attribute setting.



24
25
26
# File 'lib/rapid/error.rb', line 24

def setting
  @setting
end

#valueObject (readonly)

Returns the value of attribute value.



24
25
26
# File 'lib/rapid/error.rb', line 24

def value
  @value
end

Instance Method Details

#validation_messageObject



32
33
34
# File 'lib/rapid/error.rb', line 32

def validation_message
  "doesn't allow values of that type"
end