Back to Faker

Faker::Relationship

doc/default/relationship.md

3.8.0549 B
Original Source

Faker::Relationship

A Faker module for familial relationships.

ruby
# Keyword arguments: connection
Faker::Relationship.familial #=> "Mother" or "Grandmother"
Faker::Relationship.familial(connection: 'direct') #=> "Mother" or "Brother"
Faker::Relationship.familial(connection: 'extended') #=> "Grandmother" or "Niece" or "Aunt"

Faker::Relationship.spouse #=> "Husband" or "Wife"

Faker::Relationship.parent #=> "Father" or "Mother"

Faker::Relationship.in_law #=> "Father-in-law"

Faker::Relationship.sibling #=> "Sister" or "Brother"