aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/util.rb
blob: fc4666638ce6e9cfb224e6af30979516cd169b53 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                                                   
module ActiveSupport
  class << self
    def core_ext(subject, names)
      names.each do |name|
        require "active_support/core_ext/#{Inflector.underscore(subject.name)}/#{name}"
        subject.send :include, Inflector.constantize("ActiveSupport::CoreExtensions::#{subject.name}::#{Inflector.camelize(name)}")
      end
    end
  end
end