# File lib/dm-validations/generic_validator.rb, line 66 def execute?(target) if unless_clause = self.unless_clause if unless_clause.is_a?(Symbol) return false if target.send(unless_clause) elsif unless_clause.respond_to?(:call) return false if unless_clause.call(target) end end if if_clause = self.if_clause if if_clause.is_a?(Symbol) return target.send(if_clause) elsif if_clause.respond_to?(:call) return if_clause.call(target) end end true end