Method: Object.extended_class_methods
- Defined in:
- lib/rucola/rucola_support/core_ext/ruby/object.rb
.extended_class_methods ⇒ Object
Returns an array of all the class methods that were added by extending the class.
class FooBar; end
module Baz
def a_new_class_method; end
end
FooBar.extend(Baz)
FooBar.extended_class_methods # => ['a_new_class_method']
20 21 22 |
# File 'lib/rucola/rucola_support/core_ext/ruby/object.rb', line 20 def self.extended_class_methods .included_modules.map { |mod| mod.instance_methods }.flatten.uniq end |