module Micro::Attributes::Features::Accept::Validate::Predicate
Constants
- QUESTION_MARK
Public Class Methods
accept_failed(exp)
click to toggle source
# File lib/micro/attributes/features/accept.rb, line 104 def self.accept_failed(exp); "expected to be #{exp}"; end
call(exp, val)
click to toggle source
# File lib/micro/attributes/features/accept.rb, line 103 def self.call(exp, val); val.public_send(exp); end
call?(exp)
click to toggle source
# File lib/micro/attributes/features/accept.rb, line 102 def self.call?(exp); exp.is_a?(Symbol) && exp.to_s.end_with?(QUESTION_MARK); end
reject_failed(exp)
click to toggle source
# File lib/micro/attributes/features/accept.rb, line 105 def self.reject_failed(exp); "expected to not be #{exp}"; end