lib/facet/hash/rand_value.rb in facets-0.7.2 vs lib/facet/hash/rand_value.rb in facets-0.9.0

- old
+ new

@@ -1,18 +2 @@ -#-- -# Adapted from rand.rb by: -# * Ilmari Heikkinen <mailto:kig@misfiring.net> -# * Christian Neukirchen <mailto:chneukirchen@gmail.com> -#++ -require 'facet/hash/rand_key' -class Hash - # Returns a random hash value. - # - # require 'facet/hash/rand_value' - # - # {:one => 1, :two => 2, :three => 3}.rand_value #=> 2 - # {:one => 1, :two => 2, :three => 3}.rand_value #=> 1 - # - def rand_value - fetch( rand_key ) - end -end +require 'nano/hash/rand_value.rb' \ No newline at end of file