class OptParseValidator::OptRegexp

Implementation of the Regexp Option See ruby-doc.org/core-2.2.1/Regexp.html#method-c-new for expected values in :options

Public Instance Methods

validate(value) click to toggle source

@param [ String ] value

@return [ Regexp ]

Calls superclass method OptParseValidator::OptBase#validate
# File lib/opt_parse_validator/opts/regexp.rb, line 10
def validate(value)
  Regexp.new(super(value), attrs[:options])
end