instance method
split_rules=
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
split_rules=(s)
Specifies the split mode; used only when #hard_margins is set to true. Allowable values are:
SPLIT_FIXED-
The word will be split at the number of characters needed, with no marking at all.
repre senta ion
SPLIT_CONTINUATION-
The word will be split at the number of characters needed, with a C-style continuation character.
repr\ esen\ tati\ on
SPLIT_HYPHENATION-
The word will be split according to the hyphenator specified in #hyphenator. If there is no #hyphenator specified, works like SPLIT_CONTINUATION. The example is using TeX::Hyphen as the #hyphenator.
rep- re- sen- ta- tion
These values can be bitwise ORed together (e.g., SPLIT_FIXED | SPLIT_CONTINUATION) to provide fallback split methods. In the example given, an attempt will be made to split the word using the rules of SPLIT_CONTINUATION; if there is not enough room, the word will be split with the rules of SPLIT_FIXED. These combinations are also available as the following values:
-
SPLIT_CONTINUATION_FIXED -
SPLIT_HYPHENATION_FIXED -
SPLIT_HYPHENATION_CONTINUATION -
SPLIT_ALL
- Default
-
Text::Format::SPLIT_FIXED - Used in
-
#format,#paragraphs
Parameters
-
sreq
Source
# File actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb, line 415
def split_rules=(s)
raise ArgumentError, "Invalid value provided for split_rules." if ((s < SPLIT_FIXED) || (s > SPLIT_ALL))
@split_rules = s
end
Defined in actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb line 415
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Text::Format