Class: I18n::Transformers::Collection::Base
- Inherits:
-
Object
- Object
- I18n::Transformers::Collection::Base
- Defined in:
- lib/i18n/transformers/collection/base.rb
Instance Method Summary collapse
-
#initialize(**options, &block) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
- #transform(key, value) ⇒ Object
Constructor Details
#initialize(**options, &block) ⇒ Base
Returns a new instance of Base.
5 6 7 8 |
# File 'lib/i18n/transformers/collection/base.rb', line 5 def initialize(**, &block) @options = @block = block end |
Instance Method Details
#name ⇒ Object
10 11 12 |
# File 'lib/i18n/transformers/collection/base.rb', line 10 def name @name ||= self.class.to_s.demodulize.underscore end |
#transform(key, value) ⇒ Object
14 15 16 |
# File 'lib/i18n/transformers/collection/base.rb', line 14 def transform(key, value) raise NonImplementedError end |