module GettextI18nRails::HtmlSafeTranslations
Public Class Methods
included(base)
click to toggle source
also make available on class methods
# File lib/gettext_i18n_rails/html_safe_translations.rb, line 6 def self.included(base) base.extend self end
Public Instance Methods
_(*args)
click to toggle source
Calls superclass method
# File lib/gettext_i18n_rails/html_safe_translations.rb, line 10 def _(*args) html_safe_if_wanted super end
n_(*args)
click to toggle source
Calls superclass method
# File lib/gettext_i18n_rails/html_safe_translations.rb, line 14 def n_(*args) html_safe_if_wanted super end
s_(*args)
click to toggle source
Calls superclass method
# File lib/gettext_i18n_rails/html_safe_translations.rb, line 18 def s_(*args) html_safe_if_wanted super end
Private Instance Methods
html_safe_if_wanted(text)
click to toggle source
# File lib/gettext_i18n_rails/html_safe_translations.rb, line 24 def html_safe_if_wanted(text) return text unless GettextI18nRails.translations_are_html_safe text.to_s.html_safe end