instance method hyphenator=

Ruby on Rails 2.3.18

Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

hyphenator=(h)

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

Parameters

h req
Source
# File actionmailer/lib/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

Defined in actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb line 335 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Text::Format

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close