15 lines
285 B
Ruby
15 lines
285 B
Ruby
class PlayerCard < ActiveRecord::Base
|
|
belongs_to :player
|
|
belongs_to :play
|
|
|
|
def to_s
|
|
# TODO: Shouldn't hard code face cards here
|
|
[rank, suit].join(' ')
|
|
.gsub('11','J')
|
|
.gsub('12','Q')
|
|
.gsub('13','K')
|
|
.gsub('14','A')
|
|
.gsub('15','2')
|
|
end
|
|
end
|