Class: Regexp

Inherits:
Object show all
Defined in:
lib/active_support/core_ext/regexp.rb,
lib/active_support/core_ext/object/json.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object

:nodoc:



127
128
129
# File 'lib/active_support/core_ext/object/json.rb', line 127

def as_json(options = nil) #:nodoc:
  to_s
end

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

Returns:

  • (Boolean)


8
9
10
# File 'lib/active_support/core_ext/regexp.rb', line 8

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

#multiline?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/active_support/core_ext/regexp.rb', line 4

def multiline?
  options & MULTILINE == MULTILINE
end