Class: Bureaucrat::Validators::MaxValueValidator

Inherits:
BaseValidator show all
Defined in:
lib/bureaucrat/validators.rb

Instance Method Summary collapse

Methods inherited from BaseValidator

#call, #clean, #initialize

Constructor Details

This class inherits a constructor from Bureaucrat::Validators::BaseValidator

Instance Method Details

#codeObject



104
105
106
# File 'lib/bureaucrat/validators.rb', line 104

def code
  :max_value
end

#compare(a, b) ⇒ Object



108
109
110
# File 'lib/bureaucrat/validators.rb', line 108

def compare(a, b)
  a > b
end

#messageObject



100
101
102
# File 'lib/bureaucrat/validators.rb', line 100

def message
  'Ensure this value is less than or equal to %(limit_value)s.'
end