# `Bandera.Group`

Determines whether a given item (actor) belongs to a named group.
Group names are compared as strings.

The built-in `Map` implementation reads a `:groups` list; binaries and integers
belong to no group. Define the protocol for your own type to plug in custom group
membership.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `in?`

```elixir
@spec in?(t(), String.t()) :: boolean()
```

Returns `true` if `item` belongs to the group named `group_name`.

## Examples

    iex> Bandera.Group.in?(%{groups: [:beta, :staff]}, "beta")
    true

    iex> Bandera.Group.in?(%{groups: [:beta]}, "alpha")
    false

    iex> Bandera.Group.in?("plain-user", "beta")
    false

---

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