Class: RailsDevelopmentBoost::RequiredDependency

Inherits:
Array
  • Object
show all
Defined in:
lib/rails_development_boost/required_dependency.rb

Instance Method Summary collapse

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



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rails_development_boost/required_dependency.rb', line 8

def related_files
  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