From c16352cc3c8198d46e65923069dedda199f44487 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Kinjo Date: Wed, 9 May 2018 13:10:17 +0900 Subject: Document require_dependency [ci skip] --- activesupport/lib/active_support/dependencies.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport') 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 mechanism and marks its defined # constants as autoloaded. file_name can be either a string or # respond to to_path. @@ -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 } -- cgit v1.2.3