Module: Cl::Opts::Validate

Included in:
Cl::Opts
Defined in:
lib/cl/opts/validate.rb

Defined Under Namespace

Classes: Enum, Format, Range, Required, Requireds, Requires, Validator

Instance Method Summary collapse

Instance Method Details

#validate(cmd, opts, values, orig) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/cl/opts/validate.rb', line 6

def validate(cmd, opts, values, orig)
  Validate.constants.each do |name|
    next if name == :Validator
    const = Validate.const_get(name)
    const.new(cmd, opts, values, orig).apply
  end
end