Class: I18nable::KeyBuilder
- Inherits:
-
Object
- Object
- I18nable::KeyBuilder
- Defined in:
- lib/i18nable/key_builder.rb
Instance Method Summary collapse
- #build(key) ⇒ Object
-
#initialize(base_class) ⇒ KeyBuilder
constructor
A new instance of KeyBuilder.
Constructor Details
#initialize(base_class) ⇒ KeyBuilder
Returns a new instance of KeyBuilder.
3 4 5 |
# File 'lib/i18nable/key_builder.rb', line 3 def initialize(base_class) @base_class = base_class end |
Instance Method Details
#build(key) ⇒ Object
7 8 9 10 11 |
# File 'lib/i18nable/key_builder.rb', line 7 def build(key) return key unless key.is_a?(String) && scopable?(key) scope.concat key end |