Class: Rubi18n::TranslatedString

Inherits:
String
  • Object
show all
Defined in:
lib/rubi18n/translated_string.rb

Overview

String, which is translated to some locale and loading from Translation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str, locale) ⇒ TranslatedString

Returns a new string object containing a copy of str and translated to locale



28
29
30
31
# File 'lib/rubi18n/translated_string.rb', line 28

def initialize(str, locale)
  super(str)
  @locale = locale
end

Instance Attribute Details

#localeObject (readonly)

String locale



24
25
26
# File 'lib/rubi18n/translated_string.rb', line 24

def locale
  @locale
end