Sha256: 1373608476ff1df4e03fdf3826cee41883bd9409c143c6c1fc2c5c19f6737207

Contents?: true

Size: 262 Bytes

Versions: 5

Compression:

Stored size: 262 Bytes

Contents

module BBLib
  class OptsParser
    class Regexp < BasicOption

      protected

      def format_value(value)
        if value =~ /^\/.*\/\w*$/
          value.to_regex
        else
          /#{value}/
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bblib-2.0.5 lib/bblib/cli/options/regexp.rb
bblib-2.0.4 lib/bblib/cli/options/regexp.rb
bblib-2.0.3 lib/bblib/cli/options/regexp.rb
bblib-2.0.1 lib/bblib/cli/options/regexp.rb
bblib-2.0.0 lib/bblib/cli/options/regexp.rb