Class: I18nContextGenerator::ContextSource

Inherits:
Data
  • Object
show all
Defined in:
lib/i18n_context_generator/supplemental_context.rb

Overview

Immutable, named evidence supplied in addition to translations and source usages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, name:, content:) ⇒ ContextSource

Returns a new instance of ContextSource.



6
7
8
9
10
11
12
# File 'lib/i18n_context_generator/supplemental_context.rb', line 6

def initialize(kind:, name:, content:)
  super(
    kind: kind.to_sym,
    name: name.dup.freeze,
    content: content.dup.freeze
  )
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



5
6
7
# File 'lib/i18n_context_generator/supplemental_context.rb', line 5

def content
  @content
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



5
6
7
# File 'lib/i18n_context_generator/supplemental_context.rb', line 5

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/i18n_context_generator/supplemental_context.rb', line 5

def name
  @name
end