# `Runic.Workflow.Facts`
[🔗](https://github.com/zblanco/runic/blob/main/lib/workflow/facts.ex#L1)

Unified accessors for `Fact` and `FactRef` structs.

Avoids pattern-matching on struct types throughout the codebase when
only the hash, ancestry, or "has a value?" predicate is needed.

# `ancestry`

```elixir
@spec ancestry(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) ::
  {Runic.Workflow.Fact.hash(), Runic.Workflow.Fact.hash()} | nil
```

Returns the ancestry of a Fact or FactRef.

# `hash`

```elixir
@spec hash(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) ::
  Runic.Workflow.Fact.hash()
```

Returns the hash of a Fact or FactRef.

# `to_ref`

```elixir
@spec to_ref(Runic.Workflow.Fact.t()) :: Runic.Workflow.FactRef.t()
```

Converts a Fact to a FactRef, discarding the value.

# `value?`

```elixir
@spec value?(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) :: boolean()
```

Returns true if the struct carries a concrete value (only true for Facts with non-nil values).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
