Class: I18nContextGenerator::Parsers::TranslationEntry

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

Overview

Represents a single translation entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, text:, source_file:, metadata: {}) ⇒ TranslationEntry

Returns a new instance of TranslationEntry.



9
10
11
# File 'lib/i18n_context_generator/parsers/base.rb', line 9

def initialize(key:, text:, source_file:, metadata: {})
  super
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



8
9
10
# File 'lib/i18n_context_generator/parsers/base.rb', line 8

def key
  @key
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



8
9
10
# File 'lib/i18n_context_generator/parsers/base.rb', line 8

def 
  @metadata
end

#source_fileObject (readonly)

Returns the value of attribute source_file

Returns:

  • (Object)

    the current value of source_file



8
9
10
# File 'lib/i18n_context_generator/parsers/base.rb', line 8

def source_file
  @source_file
end

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



8
9
10
# File 'lib/i18n_context_generator/parsers/base.rb', line 8

def text
  @text
end