i want a few instance methods to be automatically defined for the user
without any explicit coding on their part.
in the below distillation of my code, i have two options (labelled), my
is whether one option is better in any way than the other, and why one
would prefer one over the other. my suspicion is that option 1 is more
space efficient, and option 2 more time efficient, is that correct?
also i should note that for people to use my module M they must call
(for other reasons) extend, foo, and init_m in the extended class
regardless of which option i finally choose. also the method init_m must
be defined in the manner below (define_method) regardless of the option
i choose, also for other reasons. and so you should not take any of
their having to be there or not into account in your assesment. thanks
instance methods in here
def self.extend_object klass
klass.class_eval ‘include InstanceMethods’
define_method :init_m do