The object responsible for hyphenating. It must respond to #hyphenate_to(word, size) and return an array of the word hyphenated into two parts. The size is the MAXIMUM size permitted, including any hyphenation marks.
| Default: | nil |
| Used in: | #format, #paragraphs |
Source Code
# File action_mailer/vendor/text-format-0.6.3/text/format.rb, line 335 def hyphenator=(h) raise ArgumentError, "#{h.inspect} is not a valid hyphenator." unless h.respond_to?(:hyphenate_to) arity = h.method(:hyphenate_to).arity raise ArgumentError, "#{h.inspect} must have exactly two or three arguments." unless [2, 3].include?(arity) @hyphenator = h @hyphenator_arity = arity end
<code/>and<pre/>for code samples.