module ConfigMapper::Validator

Public Class Methods

resolve(arg) click to toggle source
# File lib/config_mapper/validator.rb, line 5
def self.resolve(arg)
  return arg if arg.respond_to?(:call)
  if arg.respond_to?(:name)
    # looks like a primitive class -- find the corresponding coercion method
    return Kernel.method(arg.name)
  end
  arg
end