Class: Rsense::Server::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/rsense/server/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path) ⇒ Project

Returns a new instance of Project.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rsense/server/project.rb', line 10

def initialize(name, path)
  @name = name
  @path = path
  #@graph = Java::org.cx4a.rsense.typing::Graph.new
  @graph = Rsense::Server::Command::Graph.new
  @runtime = @graph.getRuntime()
  @stubs = Dir.glob(Rsense::BUILTIN.join("**/*.rb"))
  @load_path = Rsense::Server::LoadPath.paths
  unless @path == "."
    @load_path << Pathname.new(@path)
  end
  @gem_path = Rsense::Server::GemPath.paths
  @loaded = []
  @dependencies = Rsense::Server::LoadPath.dependencies(@path)
end

Instance Attribute Details

#dependenciesObject

Returns the value of attribute dependencies.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def dependencies
  @dependencies
end

#gem_pathObject

Returns the value of attribute gem_path.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def gem_path
  @gem_path
end

#graphObject

Returns the value of attribute graph.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def graph
  @graph
end

#load_pathObject

Returns the value of attribute load_path.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def load_path
  @load_path
end

#loadedObject

Returns the value of attribute loaded.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def loaded
  @loaded
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def name
  @name
end

#pathObject

Returns the value of attribute path.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def path
  @path
end

#runtimeObject

Returns the value of attribute runtime.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def runtime
  @runtime
end

#stubsObject

Returns the value of attribute stubs.



8
9
10
# File 'lib/rsense/server/project.rb', line 8

def stubs
  @stubs
end

Instance Method Details

#loaded?(feature) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/rsense/server/project.rb', line 26

def loaded?(feature)
  @loaded.include?(feature)
end