blank-white-cards/apps/bwc/lib/bwc.ex~
2020-12-28 14:35:10 -08:00

21 lines
327 B
Elixir

defmodule Bwc do
@moduledoc """
The core module for the Blank White Cards game.
"""
alias Bwc.{TestRepo, Card}
@repo TestRepo
@doc """
List all cards.
"""
def list_cards, do: @repo.all(Card)
def get_card(id), do: @repo.get!(Card, id)
def get_card_by(attrs), do: @repo.get_by(Card, attrs)
end