Someone
public text v1 · immutableclass Lego
attr_reader :picks
def initialize( *picks )
if picks.uniq.length != 1
raise ArgumentError, "Two different numbers"
end
@picks = picks
end
def self.new_random
new( rand( 25 ), rand( 25 ) )
rescue ArgumentError
redo
end
end
Lego.new_random