1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Document require_dependency [ci skip]

This commit is contained in:
Yoshiyuki Kinjo 2018-05-09 13:10:17 +09:00
parent 38ea7bb74d
commit c16352cc3c

View file

@ -224,6 +224,8 @@ module ActiveSupport #:nodoc:
Dependencies.require_or_load(file_name) Dependencies.require_or_load(file_name)
end end
# :doc:
# Interprets a file using <tt>mechanism</tt> and marks its defined # Interprets a file using <tt>mechanism</tt> and marks its defined
# constants as autoloaded. <tt>file_name</tt> can be either a string or # constants as autoloaded. <tt>file_name</tt> can be either a string or
# respond to <tt>to_path</tt>. # respond to <tt>to_path</tt>.
@ -242,6 +244,8 @@ module ActiveSupport #:nodoc:
Dependencies.depend_on(file_name, message) Dependencies.depend_on(file_name, message)
end end
# :nodoc:
def load_dependency(file) def load_dependency(file)
if Dependencies.load? && Dependencies.constant_watch_stack.watching? if Dependencies.load? && Dependencies.constant_watch_stack.watching?
Dependencies.new_constants_in(Object) { yield } Dependencies.new_constants_in(Object) { yield }