Class: String

Inherits:
Object show all
Defined in:
lib/testable/extensions/core_ruby.rb

Overview

rubocop:disable Style/DocumentationMethod

Instance Method Summary collapse

Instance Method Details

#match?(string, pos = 0) ⇒ Boolean

This is only required if using a version of Ruby before 2.4. A match? method for String was added in version 2.4.

Returns:

  • (Boolean)


6
7
8
# File 'lib/testable/extensions/core_ruby.rb', line 6

def match?(string, pos = 0)
  !!match(string, pos)
end