module Validate::AST::Combinator

Public Instance Methods

respond_to_missing?(_, _ = false) click to toggle source
# File lib/validate/ast.rb, line 173
def respond_to_missing?(_, _ = false)
  false
end

Private Instance Methods

constraint_message(index) click to toggle source
# File lib/validate/ast.rb, line 179
def constraint_message(index)
  @constraints[index].message % Hash.new do |_, key|
    if key.to_s.start_with?('constraint')
      "%{#{key.to_s.gsub('constraint', "constraint[#{index}]")}}"
    else
      "%{#{key}}"
    end
  end
end