Class: Calcifer::Graph::RootFile
- Inherits:
-
Object
- Object
- Calcifer::Graph::RootFile
- Defined in:
- lib/calcifer/graph/root_file.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#graph_root ⇒ Object
readonly
Returns the value of attribute graph_root.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
Instance Method Summary collapse
- #add_related_file_path(file_path) ⇒ Object
-
#initialize(module_name, file) ⇒ RootFile
constructor
A new instance of RootFile.
- #related_files_paths ⇒ Object
Constructor Details
#initialize(module_name, file) ⇒ RootFile
Returns a new instance of RootFile.
8 9 10 11 12 13 |
# File 'lib/calcifer/graph/root_file.rb', line 8 def initialize(module_name, file) @module_name = module_name @file = file @file_path = file.path build_graph_root end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
6 7 8 |
# File 'lib/calcifer/graph/root_file.rb', line 6 def file_path @file_path end |
#graph_root ⇒ Object (readonly)
Returns the value of attribute graph_root.
6 7 8 |
# File 'lib/calcifer/graph/root_file.rb', line 6 def graph_root @graph_root end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
6 7 8 |
# File 'lib/calcifer/graph/root_file.rb', line 6 def module_name @module_name end |
Instance Method Details
#add_related_file_path(file_path) ⇒ Object
15 16 17 |
# File 'lib/calcifer/graph/root_file.rb', line 15 def (file_path) @graph_root.add_edge(@file.path, file_path) end |
#related_files_paths ⇒ Object
19 20 21 |
# File 'lib/calcifer/graph/root_file.rb', line 19 def @graph_root.vertices - [@file.path] end |