1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class SomebodyElsesLib

end

module MetaSkills
  module KillerFeature

    def self.inlcuded(klass)
      klass.class_eval do
        extend ClassMethods
        include InstanceMethods
      end
    end

    module InstanceMethods

      def killa_instance
        'instance'
      end

    end

    module ClassMethods

      def acts_as_killa
        'class'
      end

    end

  end
end

SomebodyElsesLib.send :include, MetaSkills::KillerFeature

SomebodyElsesLib.included_modules # => [MetaSkills::KillerFeature, Kernel]
SomebodyElsesLib.extended_by      # ~> -:40: undefined method `extended_by' for SomebodyElsesLib:Class (NoMethodError)