Class: Rsense::Server::Project
- Inherits:
-
Object
- Object
- Rsense::Server::Project
- Defined in:
- lib/rsense/server/project.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#gem_path ⇒ Object
Returns the value of attribute gem_path.
-
#graph ⇒ Object
Returns the value of attribute graph.
-
#load_path ⇒ Object
Returns the value of attribute load_path.
-
#loaded ⇒ Object
Returns the value of attribute loaded.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#runtime ⇒ Object
Returns the value of attribute runtime.
-
#stubs ⇒ Object
Returns the value of attribute stubs.
Instance Method Summary collapse
-
#initialize(name, path) ⇒ Project
constructor
A new instance of Project.
- #loaded?(feature) ⇒ Boolean
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
#dependencies ⇒ Object
Returns the value of attribute dependencies.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def dependencies @dependencies end |
#gem_path ⇒ Object
Returns the value of attribute gem_path.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def gem_path @gem_path end |
#graph ⇒ Object
Returns the value of attribute graph.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def graph @graph end |
#load_path ⇒ Object
Returns the value of attribute load_path.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def load_path @load_path end |
#loaded ⇒ Object
Returns the value of attribute loaded.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def loaded @loaded end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def path @path end |
#runtime ⇒ Object
Returns the value of attribute runtime.
8 9 10 |
# File 'lib/rsense/server/project.rb', line 8 def runtime @runtime end |
#stubs ⇒ Object
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
26 27 28 |
# File 'lib/rsense/server/project.rb', line 26 def loaded?(feature) @loaded.include?(feature) end |