class TextHyphenRails::TextHyphenator

Public Class Methods

new(text, lang, options) click to toggle source
Calls superclass method TextHyphenRails::Hyphenator::new
# File lib/text_hyphen_rails/text_hyphenator.rb, line 5
def initialize(text, lang, options)
  super
  @text = text
end

Public Instance Methods

result() click to toggle source
# File lib/text_hyphen_rails/text_hyphenator.rb, line 10
def result
  @text.gsub regex do |tok|
    hyphenator.visualize(tok, @opts[:hyphen])
  end
end