I ran across a case where I was initalizing the graph in one method but needing size information (for layout) in a different
method. Rather than passing extra info through the method, why not just add attr_read :width, :height? But that raised
another point: Internally that information is stored in @rows and @columns, which is probably the wrong name as that
isn't how many rows and cols exist on the graph. I didn't change those variable names (in case you don't like that
idea) but I did set some dup variables so the accessor methods make some sense.
hell...probably easier to see the code than try to describe this little change.
Let me know what you think!
thanks,
Adam
|