lib/validation/condition.rb
def CATCH(exception, &condition)
      raise ArgumentError unless conditionable? condition
      raise TypeError, 'not error object' unless exception.ancestors.include? Exception

      ->v{
        begin
          _valid? condition, v
        rescue Exception
          $!.instance_of? exception
        else
          false
        end
      }
    end
def CATCH(exception, &condition)
      raise ArgumentError unless conditionable? condition
      raise TypeError, 'not error object' unless exception.ancestors.include? Exception

      ->v{
        begin
          _valid? condition, v
        rescue Exception
          $!.instance_of? exception
        else
          false
        end
      }
    end
def CATCH ( exception , & condition ) raise ArgumentError unless conditionable? condition raise TypeError , 'not error object' unless exception . ancestors . include? Exception -> v { begin _valid? condition , v rescue Exception $! . instance_of? exception else false end } end
A condition builder.
 @param exception [Exception]
 @return [lambda]
   this lambda return true
   if catch a specific exception when a argment checking in a block parameter
A condition builder .