Ruby-Poker 0.2.1 is an incremental update over the 0.2.0 release. The biggest change is the addition of the
delete methods to the
PokerHand object. Making it possible to add and remove cards from a hand without creating a new
require 'rubygems' require 'ruby-poker' hand.PokerHand.new("3d 3s 7h 7d") hand.to_s # => "3d 3s 7h 7d (Two pair)" hand << "7c" hand.to_s # => "3d 3s 7h 7d 7c (Full house)" hand.delete("3d") hand.delete("3s") hand.to_s # => 7h 7d 7c (Three of a kind)"
I’m always in the process of adding documentation to ruby-poker. At this point the majority of the public facing methods of the
Card classes have been documented with examples. The ruby-docs are available online at http://rubypoker.rubyforge.org/.