Class: RubyDetective::AST::Interpreter
- Inherits:
-
Object
- Object
- RubyDetective::AST::Interpreter
- Defined in:
- lib/ruby_detective/ast/interpreter.rb
Instance Attribute Summary collapse
-
#classes ⇒ Object
readonly
Returns the value of attribute classes.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#rich_ast ⇒ Object
readonly
Returns the value of attribute rich_ast.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rich_ast, file_path) ⇒ Interpreter
constructor
A new instance of Interpreter.
- #interpret_node_and_populate_store ⇒ Object
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
#classes ⇒ Object (readonly)
Returns the value of attribute classes.
4 5 6 |
# File 'lib/ruby_detective/ast/interpreter.rb', line 4 def classes @classes end |
#file_path ⇒ Object (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_ast ⇒ Object (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_store ⇒ Object
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 |