On Thu, Jan 19, 2012 at 11:51 PM, Jeremy Evans <[email protected]> wrote: >> - I need to memoize in a class variable the columns list (I'm making a >> custom checksum, excluding some columns and therefore I do not wish to >> calculate at each checksum the list of columns to exclude). How to >> insert this class variable inside the plugin ? > > Class variables are almost certainly the wrong approach. You probably > want to use class instance variables (instances variables of the > class). This is fairly easy to do by adding an attr_accessor in > ClassMethods and calling that method on the class itself. >
I did this and it works perfectly. Instead of 'calling that method on the class itself', I set the attribute value inside the 'def self.configure' of the plugin. Neat! Quite hard to figure it out, but neat! Thanks! -- Christian -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
