Class: Analyst::Entities::Root
- Inherits:
-
Entity
- Object
- Entity
- Analyst::Entities::Root
show all
- Defined in:
- lib/analyst/entities/root.rb
Instance Attribute Summary
Attributes inherited from Entity
#ast, #parent
Instance Method Summary
collapse
Methods inherited from Entity
#classes, #conditionals, #constants, handles_node, #inspect, #line_number, #location, #method_calls, #methods, #modules, #source, #top_level_classes, #top_level_constants, #top_level_modules
Constructor Details
#initialize(ast, source_data) ⇒ Root
Returns a new instance of Root.
9
10
11
12
|
# File 'lib/analyst/entities/root.rb', line 9
def initialize(ast, source_data)
@source_data = source_data
super(ast, nil)
end
|
Instance Method Details
#file_path ⇒ Object
22
23
24
|
# File 'lib/analyst/entities/root.rb', line 22
def file_path
throw "Entity tree malformed - Source or File should have caught this call"
end
|
#full_name ⇒ Object
14
15
16
|
# File 'lib/analyst/entities/root.rb', line 14
def full_name
""
end
|
#origin_source ⇒ Object
26
27
28
|
# File 'lib/analyst/entities/root.rb', line 26
def origin_source
throw "Entity tree malformed - Source or File hsould have caught this call"
end
|
#source_data_for(entity) ⇒ Object
18
19
20
|
# File 'lib/analyst/entities/root.rb', line 18
def source_data_for(entity)
source_data[actual_contents.index(entity)]
end
|