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 Method Summary
- #as_json(options = nil) Internal use only
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
Instance Method Details
#as_json(options = nil)
This method is for internal use only.
[ GitHub ]
# File 'activesupport/lib/active_support/core_ext/object/json.rb', line 140
def as_json( = nil) # :nodoc: to_s end