I was wondering if it is possible to do something like this:
class Something
def A
puts "A"
end
def B
puts "B"
end
def C
puts "C"
end
def D
puts "D"
end
end
y = Something.new
x = Random.new
x.rand(y)
then get a random result of "Something" class
Aucun commentaire:
Enregistrer un commentaire