Class: Analyst::Entities::Lvar
- Inherits:
-
Entity
- Object
- Entity
- Analyst::Entities::Lvar
show all
- Defined in:
- lib/analyst/entities/lvar.rb
Instance Attribute Summary
Attributes inherited from Entity
#ast, #parent
Instance Method Summary
collapse
Methods inherited from Entity
#classes, #conditionals, #constant_assignments, #constants, #file_path, handles_node, #hashes, #initialize, #inspect, #line_number, #location, #method_calls, #methods, #modules, process, #source, #strings, #top_level_classes, #top_level_constant_assignments, #top_level_constants, #top_level_modules, #variables
Instance Method Details
#full_name ⇒ Object
12
13
14
|
# File 'lib/analyst/entities/lvar.rb', line 12
def full_name
(scope.nil? ? parent.full_name : scope.full_name) + '::' + name
end
|
#name ⇒ Object
8
9
10
|
# File 'lib/analyst/entities/lvar.rb', line 8
def name
name_node.to_s
end
|
#scope ⇒ Object
16
17
18
|
# File 'lib/analyst/entities/lvar.rb', line 16
def scope
@scope ||= process_node(ast.children.first)
end
|