Method: Spring::Application#setup

Defined in:
lib/spring/application.rb

#setup(command) ⇒ Object

The command might need to require some files in the main process so that they are cached. For example a test command wants to load the helper file once and have it cached.



169
170
171
172
173
174
175
176
177
# File 'lib/spring/application.rb', line 169

def setup(command)
  return if @setup.include?(command.class)
  @setup << command.class

  if command.respond_to?(:setup)
    command.setup
    watcher.add loaded_application_features # loaded features may have changed
  end
end