diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-05-22 17:47:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 17:47:06 -0400 |
commit | 2b2bf2c73bf37dfc8587aa531de0e88d16769630 (patch) | |
tree | 112197622ae31c1616a49c8f066fd1ef78f42e03 /activesupport | |
parent | bdd8b6843c4af7042b5b019762d450c604418e01 (diff) | |
parent | c16352cc3c8198d46e65923069dedda199f44487 (diff) | |
download | rails-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.rb | 4 |
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 } |