NeoFaker.Blood (neo_faker v0.12.0)
View SourceFunctions for generating blood types.
This module provides utilities to generate random blood groups, blood types, and Rh factors.
Summary
Functions
Generates a random blood group.
Generates a random Rh factor.
Generates a random blood type.
Functions
@spec group() :: String.t()
Generates a random blood group.
Returns a blood group, which consists of a blood type (A
, B
, AB
, or O
) combined with an
Rh factor (+
or -
), forming a complete blood group.
Examples
iex> NeoFaker.Blood.group()
"B+"
@spec rh_factor() :: String.t()
Generates a random Rh factor.
Returns a string representing the Rh factor, which can be either +
or -
.
Examples
iex> NeoFaker.Blood.rh_factor()
"+"
@spec type() :: String.t()
Generates a random blood type.
Returns a string representing a blood type without the Rh factor.
Examples
iex> NeoFaker.Blood.type()
"B"