Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/redcloth_with_coderay.rb

Instance Method Summary collapse

Instance Method Details

#contains_newlines?Boolean

Utility method to check if a string contains newlines.

Returns:

  • (Boolean)


3
4
5
# File 'lib/redcloth_with_coderay.rb', line 3

def contains_newlines?
  self =~ /\n/
end