So I'm creating an acts_as
kind of gem, and inside the gem I want a reference to the class that is including the gem, to define methods using its name, like for example
class MyObject < ActiveRecord::Base
acts_as_whatever
end
I want to define methods from the gem using that class's name
module LocalInstanceMethods
define_method "other_#{something.name.underscore.pluralize}" do
end
end
What am I supposed to put instead of this something
so that I could create a method called other_my_objects
?
PS: calling self
references the module I'm inside which is something like
ActsAsWhatever::LocalInstanceMethods
And self.class
is
Module
Module
, I just added that to the question