123456789_123456789_123456789_123456789_123456789_

Class: Regexp

Instance Attribute Summary

Instance Method Summary

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
[ GitHub ]

  
# File 'activesupport/lib/active_support/core_ext/regexp.rb', line 11

def multiline?
  options & 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(options = nil) # :nodoc:
  to_s
end