17 lines
301 B
Ruby
17 lines
301 B
Ruby
require 'rom-repository'
|
|
|
|
module EuchreCamp
|
|
module Repositories
|
|
class Players < ::EuchreCamp::Repository[:players]
|
|
commands :create, update: :by_pk, delete: :by_pk
|
|
|
|
def all
|
|
players.to_a
|
|
end
|
|
|
|
def by_id(id)
|
|
players.by_pk(id).one!
|
|
end
|
|
end
|
|
end
|
|
end |