Class: String

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

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)


4
5
6
# File 'lib/testable/extensions/core_ruby.rb', line 4

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