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:
parent
38ea7bb74d
commit
c16352cc3c
1 changed files with 4 additions and 0 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue