aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/method_names.rb
blob: 2eb40a83abc7472054d62195abf5c8f7e1795f2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Module
  if instance_methods[0].is_a?(Symbol)
    def instance_method_names(*args)
      instance_methods(*args).map(&:to_s)
    end

    def method_names(*args)
      methods(*args).map(&:to_s)
    end
  else
    alias_method :instance_method_names, :instance_methods
    alias_method :method_names, :methods
  end
end