Class: Howdoc::Narrator::Field

Inherits:
Struct
  • Object
show all
Defined in:
lib/howdoc/narrator.rb

Overview

A value that cannot be settled until the language is known. A form field is the usual case: what a reader calls it is a translation, so recording the resolved label would freeze the guide into the language the test happened to run in.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#locatorObject

Returns the value of attribute locator

Returns:

  • (Object)

    the current value of locator



24
25
26
# File 'lib/howdoc/narrator.rb', line 24

def locator
  @locator
end

Instance Method Details

#to_howdoc_text(locale) ⇒ Object



25
26
27
# File 'lib/howdoc/narrator.rb', line 25

def to_howdoc_text(locale)
  Narrator.field_label(locator, locale:)
end