Class: I18nable::KeyBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/i18nable/key_builder.rb

Instance Method Summary collapse

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