Class: Outil::Workspace

Inherits:
Object
  • Object
show all
Defined in:
lib/outil/workspace.rb

Class Method Summary collapse

Class Method Details

.astsObject



18
19
20
# File 'lib/outil/workspace.rb', line 18

def self.asts
  @asts ||= {}
end

.ocsObject



5
6
7
# File 'lib/outil/workspace.rb', line 5

def self.ocs
  @ocs ||= OCS::Config.new
end

.referencesObject



14
15
16
# File 'lib/outil/workspace.rb', line 14

def self.references
  @references ||= []
end

.reset!Object



9
10
11
12
# File 'lib/outil/workspace.rb', line 9

def self.reset!
  @references = []
  @asts = {}
end

.scan(path, lineno, name) ⇒ Object



22
23
24
25
# File 'lib/outil/workspace.rb', line 22

def self.scan path, lineno, name
  references << [path, lineno, name]
  asts[name] = OCS::ObjectParser.new(path, name).find
end

.syncObject



27
28
29
30
31
# File 'lib/outil/workspace.rb', line 27

def self.sync
  asts.each_pair do |name, tree|
    ocs.index.append name, tree
  end
end