Class: Varify::Rules::Rule
- Inherits:
-
Object
- Object
- Varify::Rules::Rule
show all
- Defined in:
- lib/varify/rules/rule.rb
Instance Method Summary
collapse
Constructor Details
#initialize(key, name, value, options = {}) ⇒ Rule
Returns a new instance of Rule.
6
7
8
9
10
11
|
# File 'lib/varify/rules/rule.rb', line 6
def initialize(key,name,value,options={})
@value = value
@key = key
@name = name
@options = options
end
|
Instance Method Details
#error_message ⇒ Object
17
18
19
|
# File 'lib/varify/rules/rule.rb', line 17
def error_message
"#{@name} (:#{@key}) failed verification"
end
|
#valid? ⇒ Boolean
13
14
15
|
# File 'lib/varify/rules/rule.rb', line 13
def valid?
raise NotImplementedError
end
|