Class: Attestor::Validations::Message

Inherits:
String
  • Object
show all
Defined in:
lib/attestor/validations/message.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, object, options = {}) ⇒ Message

Returns a new instance of Message.



10
11
12
13
14
15
16
# File 'lib/attestor/validations/message.rb', line 10

def initialize(value, object, options = {})
  @value   = value
  @object  = object
  @options = options
  super(@value.instance_of?(Symbol) ? translation : @value.to_s)
  freeze
end