aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorYoshiyuki Kinjo <yskkin@gmail.com>2018-05-09 13:10:17 +0900
committerYoshiyuki Kinjo <yskkin@gmail.com>2018-05-09 13:20:02 +0900
commitc16352cc3c8198d46e65923069dedda199f44487 (patch)
tree880062eeb06f14283686ca08524b2ac8212daaf0 /activesupport
parent38ea7bb74d5c3d2ae992c35b6eb731d059aa772a (diff)
downloadrails-c16352cc3c8198d46e65923069dedda199f44487.tar.gz
rails-c16352cc3c8198d46e65923069dedda199f44487.tar.bz2
rails-c16352cc3c8198d46e65923069dedda199f44487.zip
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 }