Class: Rsense::Server::Command::RuntimeHelper

Inherits:
Java::org.cx4a.rsense.typing.runtime::RuntimeHelper
  • Object
show all
Defined in:
lib/rsense/server/command/runtime_helper.rb

Class Method Summary collapse

Class Method Details

.get_namespace(graph, node) ⇒ Object



27
28
29
# File 'lib/rsense/server/command/runtime_helper.rb', line 27

def self.get_namespace(graph, node)
  self.getNamespace(graph, node)
end

.getNamespace(graph, node) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rsense/server/command/runtime_helper.rb', line 13

def self.getNamespace(graph, node)
  if node.class.to_s.match(/Colon2ConstNode/)
    left = graph.createVertex((node).getLeftNode())
    object = left.singleType()
    if object && object.java_object.java_kind_of?(Java::org.cx4a.rsense.ruby::RubyModule)
      return object
    else
      return nil
    end
  else
    super
  end
end