T
Tobias Jonch
------=_Part_11884_446215.1135340581206
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I'm having problems with displaying an object correctly. I keep getting the
obj's ID back, like this:
sendto("Chromosomes: " + p.c_chromosomes.to_s) # sort of 'puts' =3D>
Chromosomes: #<Chromosome:0x10267658>
Checking with the Pickaxe, I see they have a solution (no obvious
explanation though), where they suggest redifining to_s to accomodate its
purpose in their 'song' class. This is no good for me though, as to_s will
be used to display a lot of things, not just chromosomes.
Uhm. I feel like I should provide more info to ensure an accurate answer,
but I'm not sure what or how much is necessary.
Perhaps that the variable actually saves right in the yaml file:
...
c_chromosomes: !ruby/object:Chromosome
c_chromosomes: # hash of arrays
symmetry: []
...
Any insights would be much appreciated.
Tobias
------=_Part_11884_446215.1135340581206--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I'm having problems with displaying an object correctly. I keep getting the
obj's ID back, like this:
sendto("Chromosomes: " + p.c_chromosomes.to_s) # sort of 'puts' =3D>
Chromosomes: #<Chromosome:0x10267658>
Checking with the Pickaxe, I see they have a solution (no obvious
explanation though), where they suggest redifining to_s to accomodate its
purpose in their 'song' class. This is no good for me though, as to_s will
be used to display a lot of things, not just chromosomes.
Uhm. I feel like I should provide more info to ensure an accurate answer,
but I'm not sure what or how much is necessary.
Perhaps that the variable actually saves right in the yaml file:
...
c_chromosomes: !ruby/object:Chromosome
c_chromosomes: # hash of arrays
symmetry: []
...
Any insights would be much appreciated.
Tobias
------=_Part_11884_446215.1135340581206--