Sha256: 5d8c7ee67e43edf46449251cda4408245997980ad6da535b7e21243f75b42b75
Contents?: true
Size: 262 Bytes
Versions: 2
Compression:
Stored size: 262 Bytes
Contents
module RubyQuiz1 class Card attr_reader :value, :suit def initialize(value, suit) raise ArgumentError unless (1..13).to_a.include? value @value, @suit = value, suit end def total_value value + suit.value end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby_quiz_1-0.0.2 | lib/ruby_quiz_1/card.rb |
ruby_quiz_1-0.0.1 | lib/ruby_quiz_1/card.rb |