Sha256: ed2fc755152927f63a70fdf8a0a47d4e76b7a860bfb2d5d5e4a5d78b166140c7

Contents?: true

Size: 239 Bytes

Versions: 182

Compression:

Stored size: 239 Bytes

Contents

module Regexp::Expression
  class Base
    def match?(string)
      !!match(string)
    end
    alias :matches? :match?

    def match(string, offset = 0)
      Regexp.new(to_s).match(string, offset)
    end
    alias :=~ :match
  end
end

Version data entries

182 entries across 165 versions & 27 rubygems

Version Path
regexp_parser-2.0.2 lib/regexp_parser/expression/methods/match.rb
regexp_parser-2.0.1 lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.8.2/lib/regexp_parser/expression/methods/match.rb
regexp_parser-2.0.0 lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.8.2 lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.8.1 lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.8.0 lib/regexp_parser/expression/methods/match.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.7.0/lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/methods/match.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.7.1/lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.7.1 lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.7.0/lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/regexp_parser-1.7.0/lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.7.0 lib/regexp_parser/expression/methods/match.rb
tdiary-5.1.0 vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb