Class: RailsDevelopmentBoost::RequiredDependency
- Inherits:
-
Array
- Object
- Array
- RailsDevelopmentBoost::RequiredDependency
- Defined in:
- lib/rails_development_boost/required_dependency.rb
Instance Method Summary collapse
-
#initialize(currently_loading) ⇒ RequiredDependency
constructor
A new instance of RequiredDependency.
- #related_files ⇒ Object
Constructor Details
#initialize(currently_loading) ⇒ RequiredDependency
Returns a new instance of RequiredDependency.
3 4 5 6 |
# File 'lib/rails_development_boost/required_dependency.rb', line 3 def initialize(currently_loading) super(caller) @currently_loading = currently_loading end |
Instance Method Details
#related_files ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_development_boost/required_dependency.rb', line 8 def files = [] each_autoloaded_file do |file_path| if @currently_loading == file_path files << @currently_loading break elsif LoadedFile.loaded?(file_path) files << file_path end end files.uniq end |