Class: I18n::Transformers::Collection::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n/transformers/collection/base.rb

Direct Known Subclasses

Generic, Markdown

Instance Method Summary collapse

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(**options, &block)
  @options = options
  @block = block
end

Instance Method Details

#nameObject



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

Raises:

  • (NonImplementedError)


14
15
16
# File 'lib/i18n/transformers/collection/base.rb', line 14

def transform(key, value)
  raise NonImplementedError
end