Class: Themis::Validation::Validator
- Inherits:
-
Object
- Object
- Themis::Validation::Validator
- Defined in:
- lib/themis/validation/validator.rb
Overview
Simple structure to store information about methods called on validation module. It saves name and arguments of validation method in order to apply it on model later.
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, args) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(name, args) ⇒ Validator
Returns a new instance of Validator.
12 13 14 |
# File 'lib/themis/validation/validator.rb', line 12 def initialize(name, args) @name, @args = name, args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
8 9 10 |
# File 'lib/themis/validation/validator.rb', line 8 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/themis/validation/validator.rb', line 8 def name @name end |