diff options
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/mail_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 75901bc431..e708e36369 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -29,7 +29,14 @@ module ActionMailer @_message.attachments end - private + # Returns +text+ wrapped at +len+ columns and indented +indent+ spaces. + # + # === Examples + # + # my_text = "Here is a sample text with more than 40 characters" + # + # simple_format(my_text, 25, 4) + # # => " Here is a sample text with\n more than 40 characters" def format_paragraph(text, len = 72, indent = 2) sentences = [[]] |