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.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rsense/server/project.rb', line 6

def initialize(name, path)
  @name = name
  @path = path
  @graph = Rsense::Typing::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.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def dependencies
  @dependencies
end

#gem_pathObject

Returns the value of attribute gem_path.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def gem_path
  @gem_path
end

#graphObject

Returns the value of attribute graph.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def graph
  @graph
end

#load_pathObject

Returns the value of attribute load_path.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def load_path
  @load_path
end

#loadedObject

Returns the value of attribute loaded.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def loaded
  @loaded
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def name
  @name
end

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def path
  @path
end

#runtimeObject

Returns the value of attribute runtime.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def runtime
  @runtime
end

#stubsObject

Returns the value of attribute stubs.



4
5
6
# File 'lib/rsense/server/project.rb', line 4

def stubs
  @stubs
end

Instance Method Details

#loaded?(feature) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/rsense/server/project.rb', line 21

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