Class: RubyDetective::AST::Interpreter

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_detective/ast/interpreter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rich_ast, file_path) ⇒ Interpreter

Returns a new instance of Interpreter.



6
7
8
9
# File 'lib/ruby_detective/ast/interpreter.rb', line 6

def initialize(rich_ast, file_path)
  @rich_ast = rich_ast
  @file_path = file_path
end

Instance Attribute Details

#classesObject (readonly)

Returns the value of attribute classes.



4
5
6
# File 'lib/ruby_detective/ast/interpreter.rb', line 4

def classes
  @classes
end

#file_pathObject (readonly)

Returns the value of attribute file_path.



4
5
6
# File 'lib/ruby_detective/ast/interpreter.rb', line 4

def file_path
  @file_path
end

#rich_astObject (readonly)

Returns the value of attribute rich_ast.



4
5
6
# File 'lib/ruby_detective/ast/interpreter.rb', line 4

def rich_ast
  @rich_ast
end

Class Method Details

.interpret_node_and_populate_store(*args) ⇒ Object



11
12
13
# File 'lib/ruby_detective/ast/interpreter.rb', line 11

def self.interpret_node_and_populate_store(*args)
  new(*args).interpret_node_and_populate_store
end

Instance Method Details

#interpret_node_and_populate_storeObject



15
16
17
18
19
# File 'lib/ruby_detective/ast/interpreter.rb', line 15

def interpret_node_and_populate_store
  register_classes_and_constants

  true
end