Class: Bureaucrat::Validators::MaxLengthValidator
Instance Method Summary
collapse
#call, #initialize
Instance Method Details
#clean(x) ⇒ Object
158
159
160
|
# File 'lib/bureaucrat/validators.rb', line 158
def clean(x)
x.length
end
|
#code ⇒ Object
150
151
152
|
# File 'lib/bureaucrat/validators.rb', line 150
def code
:max_length
end
|
#compare(a, b) ⇒ Object
154
155
156
|
# File 'lib/bureaucrat/validators.rb', line 154
def compare(a, b)
a > b
end
|
#message ⇒ Object
146
147
148
|
# File 'lib/bureaucrat/validators.rb', line 146
def message
'Ensure this value has at most %(limit_value)d characters (it has %(show_value)d).'
end
|