From 8e73e589a8949c8162f81148bb497804fa641e1d Mon Sep 17 00:00:00 2001 From: Diego Carrion Date: Wed, 9 Mar 2011 16:06:48 -0300 Subject: publicise ActionMailer::MailHelper.format_paragraph [#6550 state:committed] Signed-off-by: Santiago Pastorino --- actionmailer/lib/action_mailer/mail_helper.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib/action_mailer/mail_helper.rb') 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 = [[]] -- cgit v1.2.3