aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/reachable.rb
blob: 8cb09dd2598f78e78d03625908d473ba0d4eafde (plain) (blame)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true
require "active_support/core_ext/module/anonymous"
require "active_support/core_ext/string/inflections"

class Module
  def reachable? #:nodoc:
    !anonymous? && name.safe_constantize.equal?(self)
  end
end