Class: Datacaster::ContextNodes::I18nKeysMapper

Inherits:
Datacaster::ContextNode show all
Defined in:
lib/datacaster/context_nodes/i18n_keys_mapper.rb

Instance Method Summary collapse

Methods inherited from Datacaster::ContextNode

#cast, #inspect

Methods included from Mixin

#&, #*, #call, #call_with_runtime, #cast_errors, #i18n_key, #i18n_map_keys, #i18n_scope, #i18n_vars, #inspect, #then, #with_context, #with_object_context, #with_runtime, #|

Constructor Details

#initialize(base, mapping) ⇒ I18nKeysMapper

Returns a new instance of I18nKeysMapper.



4
5
6
7
8
# File 'lib/datacaster/context_nodes/i18n_keys_mapper.rb', line 4

def initialize(base, mapping)
  super(base)
  @mapping = mapping
  @from_keys = @mapping.keys
end