Exception: Localite::Translate::Missing
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Localite::Translate::Missing
- Defined in:
- lib/localite/translate.rb
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Missing
constructor
A new instance of Missing.
- #to_s ⇒ Object
Constructor Details
#initialize(opts) ⇒ Missing
Returns a new instance of Missing.
81 82 83 84 85 |
# File 'lib/localite/translate.rb', line 81 def initialize(opts) @locale, @string = *opts @scope = Localite.current_scope.to_s # dlog "--> scope", @scope.inspect end |
Instance Attribute Details
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
79 80 81 |
# File 'lib/localite/translate.rb', line 79 def locale @locale end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
79 80 81 |
# File 'lib/localite/translate.rb', line 79 def scope @scope end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
79 80 81 |
# File 'lib/localite/translate.rb', line 79 def string @string end |
Instance Method Details
#to_s ⇒ Object
87 88 89 |
# File 'lib/localite/translate.rb', line 87 def to_s "Missing translation: [#{locale}] #{string.inspect} (in scope #{scope.inspect})" end |