D
darren kirby
Hello all,
My class is a library that allows users to read information/tags etc from Flac
files.
When the class is initialized in irb the content of every single instance
variable is dumped to the console. This library parses a lot of data from
various blocks, and has many data structures to hold it all. As such, this
output can contain as much as two screens worth. Some of this data is
non-readable and is for 'top-secret internal use only'. That is, it isn't
secret, but it has no value or use to the user directly .
Anyway, I would really like to clean up this output and have irb print only
eg:
=> #<FlacInfo:0x6f97cca4>
Or perhaps the above with a brief enumeration of the blocks found and their
sizes and/or offsets. To this end I tried defining the class' to_s method,
and modifying the initialize method's return value. Neither had an effect.
How might I accomplish this?
Thanks for consideration,
-d
My class is a library that allows users to read information/tags etc from Flac
files.
When the class is initialized in irb the content of every single instance
variable is dumped to the console. This library parses a lot of data from
various blocks, and has many data structures to hold it all. As such, this
output can contain as much as two screens worth. Some of this data is
non-readable and is for 'top-secret internal use only'. That is, it isn't
secret, but it has no value or use to the user directly .
Anyway, I would really like to clean up this output and have irb print only
eg:
=> #<FlacInfo:0x6f97cca4>
Or perhaps the above with a brief enumeration of the blocks found and their
sizes and/or offsets. To this end I tried defining the class' to_s method,
and modifying the initialize method's return value. Neither had an effect.
How might I accomplish this?
Thanks for consideration,
-d