Class: Regexp
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activesupport/lib/active_support/core_ext/regexp.rb, activesupport/lib/active_support/core_ext/object/json.rb |
Instance Attribute Summary
-
#multiline? ⇒ Boolean
readonly
Returns
true
if the regexp has the multiline flag set.
Instance Attribute Details
#multiline? ⇒ Boolean
(readonly)
Returns true
if the regexp has the multiline flag set.
(/./).multiline? # => false
(/./m).multiline? # => true
Regexp.new(".").multiline? # => false
Regexp.new(".", Regexp::MULTILINE).multiline? # => true
# File 'activesupport/lib/active_support/core_ext/regexp.rb', line 11
def multiline? & MULTILINE == MULTILINE end