Sha256: dce0ce4c46db20ccc0f42be0685083974775a6eeea3160a1d27a5f252772efee

Contents?: true

Size: 325 Bytes

Versions: 14

Compression:

Stored size: 325 Bytes

Contents

# Matching (#{PATTERN}) will match "foo" or /foo/, and return a
# regular expression. With quotes, the expression will be escaped.

PATTERN = /[\"\/](?:\\.|[^\"\/\\])*[\"\/]/

Transform /^\/((?:\\.|[^\/\\])*)\/$/ do |rx|
  Regexp.new(rx)
end

Transform /^\"((?:\\.|[^\"\\])*)\"$/ do |str|
  Regexp.new(Regexp.quote(str))
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vendorificator-0.6.0 features/support/transform_pattern.rb
vendorificator-0.5.3 features/support/transform_pattern.rb
vendorificator-0.5.2 features/support/transform_pattern.rb
vendorificator-0.5.1 features/support/transform_pattern.rb
vendorificator-0.5.0 features/support/transform_pattern.rb
vendorificator-0.5.git.v0.4.0.63.g8e9d54d features/support/transform_pattern.rb
vendorificator-0.5.git.v0.4.0.60.g9c35209 features/support/transform_pattern.rb
vendorificator-0.5.git.v0.4.0.17.g26d50d8 features/support/transform_pattern.rb
vendorificator-0.4.0 features/support/transform_pattern.rb
vendorificator-0.3.0 features/support/transform_pattern.rb
vendorificator-0.2.0 features/support/transform_pattern.rb
vendorificator-0.1.1 features/support/transform_pattern.rb
vendorificator-0.1.0 features/support/transform_pattern.rb
vendorificator-0.0.1 features/support/transform_pattern.rb