lib/cards_lib/deck.rb in cards_lib-0.0.1 vs lib/cards_lib/deck.rb in cards_lib-0.0.2

- old
+ new

@@ -1,8 +1,9 @@ module CardsLib class Deck - def initialize(cards = Standard::PLAYING_CARDS, options = {}) - @seed = options.fetch(:seed) { Random.new.seed } + def initialize(options = {}) + cards = options.fetch(:cards) { Standard::PLAYING_CARDS } + @seed = options.fetch(:seed) { Random.new.seed } @top = 0 @cards = cards.map {|c| Card.new(c) }.shuffle(random: Random.new(@seed)).to_enum end def cards