Class: Reorm::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/reorm/validators/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, *field) ⇒ Validator

Returns a new instance of Validator.



7
8
9
10
# File 'lib/reorm/validators/validator.rb', line 7

def initialize(message, *field)
  @field   = FieldPath.new(*field)
  @message = message
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



11
12
13
# File 'lib/reorm/validators/validator.rb', line 11

def field
  @field
end

#messageObject (readonly)

Returns the value of attribute message.



11
12
13
# File 'lib/reorm/validators/validator.rb', line 11

def message
  @message
end