Method: CardsLib::Ranker#initialize

Defined in:
lib/cards_lib/ranker.rb

#initialize(rank = nil, ranks = nil, rank_lookup = nil) ⇒ Ranker

Initialize’s arguments: rank - is whatever part of the object, or the object itself you choose to use. ranks - is a simple hash to lookup a cards value with the keys matching the rank object. rank_lookup - is an optional Proc to redefine how you will lookup a cards value.



9
10
11
12
13
# File 'lib/cards_lib/ranker.rb', line 9

def initialize(rank = nil, ranks = nil, rank_lookup = nil)
  @rank = rank
  @ranks = ranks
  @rank_lookup = rank_lookup
end