module Conchiterz

Constants

VERSION

Attributes

result[R]

Public Instance Methods

monkey_patch(str) click to toggle source
# File lib/conchiterz.rb, line 29
def monkey_patch(str)
  str.send(:include, Conchiterz::StringMethods)
end
translate(string, switch, escape = []) click to toggle source
# File lib/conchiterz.rb, line 16
def translate(string, switch, escape = [])
  return if string.nil?
  return string unless switch

  @result = []
  a_words = string.scan(Config::REGEXP)
  a_words.each do |word|
    Typography.new(word, escape, result).call
  end
  Punctuation.new(result).call
  result.join(' ')
end