encodeAs method

TfArg<String> encodeAs(
  1. String attribute
)

The argument value: attribute of the referenced block, unless the reference was built from a value or pinned to another attribute. Generated wrappers call this with the attribute their argument takes.

Implementation

TfArg<String> encodeAs(String attribute) {
  final arg = _source.arg;
  if (arg != null) return arg;
  final owner = _source.owner!;
  final attr = _source.attribute ?? attribute;
  return owner is Data
      ? TfRef.data<String>(owner, attr)
      : TfRef.attribute<String>(owner, attr);
}