Sha256: 6b40f19ce1b23e95f4e2dfdd6590728e7de578692d5617d3dc6a928505a9eb46

Contents?: true

Size: 340 Bytes

Versions: 28

Compression:

Stored size: 340 Bytes

Contents

module OptParseValidator
  # Implementation of the Regexp Option
  # See http://ruby-doc.org/core-2.2.1/Regexp.html#method-c-new for expected values in :options
  class OptRegexp < OptBase
    # @param [ String ] value
    #
    # @return [ Regexp ]
    def validate(value)
      Regexp.new(super(value), attrs[:options])
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
opt_parse_validator-0.0.17.0 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.6 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.5 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.4 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.3 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.2 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.1 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.16.0 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.15.2 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.15.1 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.15.0 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.14.1 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.14.0 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.11 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.10 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.9 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.8 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.7 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.6 lib/opt_parse_validator/opts/regexp.rb
opt_parse_validator-0.0.13.5 lib/opt_parse_validator/opts/regexp.rb