Skip to content

Getter[T, R]

Abstract type for class-field getter objects.

For a computed field obj.name:

  • reading obj.name calls getter.get(obj)
  • calling obj.name(...) first calls getter.get(obj), then calls the result

Methods

get obj -> R

Returns the field value for obj.

Parameters

NameTypeDescription
obj T instance being accessed