Class: Rubi18n::TranslatedString
- Inherits:
-
String
- Object
- String
- Rubi18n::TranslatedString
- Defined in:
- lib/rubi18n/translated_string.rb
Overview
String, which is translated to some locale and loading from Translation.
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
String locale.
Instance Method Summary collapse
-
#initialize(str, locale) ⇒ TranslatedString
constructor
Returns a new string object containing a copy of str and translated to
locale
.
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
#locale ⇒ Object (readonly)
String locale
24 25 26 |
# File 'lib/rubi18n/translated_string.rb', line 24 def locale @locale end |