I try to include some modules to a class instance, but I have
problems with the scope, here’s what I did:
person.roles.each do |role|
class << person
end if role.class.const_defined?(‘Functions’)
end unless person.nil?
As you can see role is not defined when I include it, does anybody
know how I can add some singleton methods to person?