Forum: Ruby Kirbybase: Displaying a field value

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Acdabad15b58ba105df230e3ea02523d?d=identicon&s=25 basi_lio (Guest)
on 2005-12-02 08:44
(Received via mailing list)
Hello,
This is likely to be another one of those embarrassing questions.

I have a table of tokens, one token one record,  which I'd like to
process as strings, for example:

tgl_tokens.select.each do |t|
  puts t.to_s
end

I expect, say:

Retraction
headline

But I get:

#<struct #<Class:0x4dee4a8> recno=579, tgltoken="Retraction">
#<struct #<Class:0x4dee4a8> recno=580, tgltoken="headline">

How do I get the expected results?

Thanks for the help.
basi
Acdabad15b58ba105df230e3ea02523d?d=identicon&s=25 basi_lio (Guest)
on 2005-12-02 08:48
(Received via mailing list)
I also tried simply:

puts t

but I got the same results.


basi
Acdabad15b58ba105df230e3ea02523d?d=identicon&s=25 basi_lio (Guest)
on 2005-12-02 09:04
(Received via mailing list)
I knew this was an embarrassing question. I got it:

puts t.tgltoken


basi
This topic is locked and can not be replied to.