I have got the following Ruby hash:
hash = {
0 => "
===
@@@
@ @
@ @
@ @
@@@
===",
1 => "
=
@
@
@
@
@
="}
I would like to print out some of the values of the hash in one line in the console. To that effect, I have created an array with the elements I would like printed out:
test = [hash[0], hash[1]]
or
test1 = [hash[0], hash[0]]
In case I want to print test1
to the console, the result should be the following:
======
@@@@@@
@ @@ @
@ @@ @
@ @@ @
@@@@@@
======
In case I want to print `test2 to the console, the result should be:
====
@@@@
@ @@
@ @@
@ @@
@@@@
====
However, when I use puts
or print
, the result is always that one is printed after another and not in the same line.