Nf.Blood (neo_faker v0.6.1)
View SourceProvides functions for generating blood types.
This module includes functions to generate random blood type groups, blood types, and Rh factors.
Summary
Functions
Returns a random blood type group.
Returns a random Rh factor.
Returns a random blood type.
Functions
@spec group() :: String.t()
Returns a random blood type group.
A blood type group consists of a blood type (A
, B
, AB
, or O
)
and an Rh factor (+
or -
), forming a complete blood group.
Examples
iex> Nf.Blood.group()
"B+"
@spec rh_factor() :: String.t()
Returns a random Rh factor.
The Rh factor is either +
(positive) or -
(negative).
Examples
iex> Nf.Blood.rh_factor()
"+"
@spec type() :: String.t()
Returns a random blood type.
A blood type is one of A
, B
, AB
, or O
, without the Rh factor.
Examples
iex> Nf.Blood.type()
"B"