Class: Holistic::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/holistic/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, root_directory:) ⇒ Application

Returns a new instance of Application.



7
8
9
10
11
# File 'lib/holistic/application.rb', line 7

def initialize(name:, root_directory:)
  @name = name
  @root_directory = root_directory
  @database = Database.new.tap(&Database::Migrations::Run)
end

Instance Attribute Details

#databaseObject (readonly)

Returns the value of attribute database.



5
6
7
# File 'lib/holistic/application.rb', line 5

def database
  @database
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/holistic/application.rb', line 5

def name
  @name
end

#root_directoryObject (readonly)

Returns the value of attribute root_directory.



5
6
7
# File 'lib/holistic/application.rb', line 5

def root_directory
  @root_directory
end

Instance Method Details

#extensionsObject



13
14
15
# File 'lib/holistic/application.rb', line 13

def extensions
  @extensions ||= Extensions::Events.new
end

#filesObject



25
26
27
# File 'lib/holistic/application.rb', line 25

def files
  @files ||= Document::File::Repository.new(database:)
end

#referencesObject



21
22
23
# File 'lib/holistic/application.rb', line 21

def references
  @references ||= Ruby::Reference::Repository.new(database:)
end

#scopesObject



17
18
19
# File 'lib/holistic/application.rb', line 17

def scopes
  @scopes ||= Ruby::Scope::Repository.new(database:)
end

#type_inference_processing_queueObject



29
30
31
# File 'lib/holistic/application.rb', line 29

def type_inference_processing_queue
  @type_inference_processing_queue ||= Ruby::TypeInference::ProcessingQueue.new
end

#unsaved_documentsObject



33
34
35
# File 'lib/holistic/application.rb', line 33

def unsaved_documents
  @unsaved_documents ||= Document::Unsaved::Collection.new
end