in ClassMethods module and I'm available to get them in InstanceMethods
with self.class.some_field. But when I try to do like this:
I may not be reading you correctly, but at that point do you not need
to be using self.some_field ? (self.class.some_field would be trying
to find that method on Class or something like that.
self.send(:include, MyModule::InstanceMethods)
end
end
module InstanceMethods
define_method "#{self.some_field}" do
# code
end
end
end
OK. when the define_method runs, self is the module InstanceMethods.
At that point it hasn't even been included in anything so there is no
way to get the value of some_field.
I would just be doing this from the money_is method (or if you want to
keep the InstanceMethods module then from its included hook.