aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-05-22 17:47:06 -0400
committerGitHub <noreply@github.com>2018-05-22 17:47:06 -0400
commit2b2bf2c73bf37dfc8587aa531de0e88d16769630 (patch)
tree112197622ae31c1616a49c8f066fd1ef78f42e03 /activesupport
parentbdd8b6843c4af7042b5b019762d450c604418e01 (diff)
parentc16352cc3c8198d46e65923069dedda199f44487 (diff)
downloadrails-2b2bf2c73bf37dfc8587aa531de0e88d16769630.tar.gz
rails-2b2bf2c73bf37dfc8587aa531de0e88d16769630.tar.bz2
rails-2b2bf2c73bf37dfc8587aa531de0e88d16769630.zip
Merge pull request #32851 from yskkin/doc_require_dependency
Document require_dependency [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/dependencies.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 0f59558bb5..a02cefc78e 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -224,6 +224,8 @@ module ActiveSupport #:nodoc:
Dependencies.require_or_load(file_name)
end
+ # :doc:
+
# Interprets a file using <tt>mechanism</tt> and marks its defined
# constants as autoloaded. <tt>file_name</tt> can be either a string or
# respond to <tt>to_path</tt>.
@@ -242,6 +244,8 @@ module ActiveSupport #:nodoc:
Dependencies.depend_on(file_name, message)
end
+ # :nodoc:
+
def load_dependency(file)
if Dependencies.load? && Dependencies.constant_watch_stack.watching?
Dependencies.new_constants_in(Object) { yield }