Sha256: e6c58c4142b9d3a49d9a0caa1a77c2e8e049508a9c1231305fab26b5b4b8fdf6

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

# encoding: utf-8

require 'i18n'
require_relative '../typogrowth'

class String
  # Typographyes the string and returns a result
  # See Typogrowth::Parser#parse
  def typo lang = nil
    Typogrowth::Parser.parse(self, lang: lang ? lang : I18n.locale)
  end
  # Typographyes the string inplace
  # See Typogrowth::Parser#parse!
  def typo! lang = nil
    Typogrowth::Parser.parse!(self, lang: lang ? lang : I18n.locale)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typogrowth-0.9.3 lib/typogrowth/string.rb