@author Guy van den Berg @since 0.9
# File lib/couchrest/validation/validators/method_validator.rb, line 45 def ==(other) @options[:method] == other.instance_variable_get(:@options)[:method] && super end
# File lib/couchrest/validation/validators/method_validator.rb, line 39 def call(target) result, message = target.send(@options[:method]) add_error(target, message, field_name) unless result result end
# File lib/couchrest/validation/validators/method_validator.rb, line 33 def initialize(field_name, options={}) super @field_name, @options = field_name, options.clone @options[:method] = @field_name unless @options.has_key?(:method) end