class Faker::Relationship

def familial(connection: nil)

Returns:
  • (String) -
def familial(connection: nil)
  familial_connections = translate('faker.relationship.familial').keys
  if connection.nil?
    connection = sample(familial_connections).to_s
  else
    connection = connection.to_s.downcase
    unless familial_connections.include?(connection.to_sym)
      raise ArgumentError,
            "Familial connections can be left blank or #{familial_connections.join(', ')}"
    end
  end
  fetch("relationship.familial.#{connection}")
end