class Veto::AttributeCheck
Public Class Methods
new(attribute_name, options={})
click to toggle source
# File lib/veto/checks/attribute_check.rb, line 3 def initialize(attribute_name, options={}) @attribute_name = attribute_name @options = options end
Public Instance Methods
call(cco)
click to toggle source
# File lib/veto/checks/attribute_check.rb, line 8 def call(cco) value = cco.entity.public_send(@attribute_name) check(@attribute_name, value, cco.errors, @options) end
Private Instance Methods
check(attribute_name, value, errors, options)
click to toggle source
# File lib/veto/checks/attribute_check.rb, line 15 def check(attribute_name, value, errors, options) raise(NotImplementedError) end