Exception: Environmentor::Attribute::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/environmentor/attribute.rb

Direct Known Subclasses

Missing

Defined Under Namespace

Classes: Missing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attr, mappers, opts, message: "Validation error") ⇒ ValidationError

Returns a new instance of ValidationError.



10
11
12
13
14
15
# File 'lib/environmentor/attribute.rb', line 10

def initialize(attr, mappers, opts, message: "Validation error")
  @attr = attr
  @mappers = mappers
  @opts = opts
  @message = message
end

Instance Attribute Details

#attrObject (readonly)

Returns the value of attribute attr.



8
9
10
# File 'lib/environmentor/attribute.rb', line 8

def attr
  @attr
end

Instance Method Details

#message(msg = nil) ⇒ Object



17
18
19
# File 'lib/environmentor/attribute.rb', line 17

def message(msg = nil)
  decorate_msg(msg || @message)
end