Class: GLib::Instantiatable

Inherits:
Object
  • Object
show all
Defined in:
glib2/lib/glib2.rb

Class Method Summary collapse

Class Method Details

.include(*modules, &block) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'glib2/lib/glib2.rb', line 142

def include(*modules, &block)
  result = super
  modules.each do |mod|
    next if mod.is_a?(Interface)
    mod.public_instance_methods(false).each do |name|
      check_new_method(name)
    end
    mod.protected_instance_methods(false).each do |name|
      check_new_method(name)
    end
    mod.private_instance_methods(false).each do |name|
      check_new_method(name)
    end
  end
  result
end

.method_added(name) ⇒ Object



136
137
138
139
140
# File 'glib2/lib/glib2.rb', line 136

def method_added(name)
  result = super
  check_new_method(name)
  result
end