Class: DiverDown::Web::DefinitionModuleDependencies::ModuleDependency
- Inherits:
-
Object
- Object
- DiverDown::Web::DefinitionModuleDependencies::ModuleDependency
- Defined in:
- lib/diver_down/web/definition_module_dependencies.rb
Instance Attribute Summary collapse
-
#module ⇒ Object
Returns the value of attribute module.
-
#module_dependencies ⇒ Object
readonly
Returns the value of attribute module_dependencies.
-
#module_reverse_dependencies ⇒ Object
readonly
Returns the value of attribute module_reverse_dependencies.
-
#source_map ⇒ Object
readonly
Returns the value of attribute source_map.
-
#source_reverse_dependency_map ⇒ Object
readonly
Returns the value of attribute source_reverse_dependency_map.
Instance Method Summary collapse
-
#initialize(modulee) ⇒ ModuleDependency
constructor
A new instance of ModuleDependency.
- #source_reverse_dependencies ⇒ Array<Source>
- #sources ⇒ Array<Source>
Constructor Details
#initialize(modulee) ⇒ ModuleDependency
Returns a new instance of ModuleDependency.
10 11 12 13 14 15 16 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 10 def initialize(modulee) @module = modulee @module_dependencies = Set.new @module_reverse_dependencies = Set.new @source_map = {} @source_reverse_dependency_map = {} end |
Instance Attribute Details
#module ⇒ Object
Returns the value of attribute module.
7 8 9 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 7 def module @module end |
#module_dependencies ⇒ Object (readonly)
Returns the value of attribute module_dependencies.
8 9 10 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 8 def module_dependencies @module_dependencies end |
#module_reverse_dependencies ⇒ Object (readonly)
Returns the value of attribute module_reverse_dependencies.
8 9 10 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 8 def module_reverse_dependencies @module_reverse_dependencies end |
#source_map ⇒ Object (readonly)
Returns the value of attribute source_map.
8 9 10 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 8 def source_map @source_map end |
#source_reverse_dependency_map ⇒ Object (readonly)
Returns the value of attribute source_reverse_dependency_map.
8 9 10 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 8 def source_reverse_dependency_map @source_reverse_dependency_map end |
Instance Method Details
#source_reverse_dependencies ⇒ Array<Source>
24 25 26 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 24 def source_reverse_dependencies @source_reverse_dependency_map.keys.sort.map { @source_reverse_dependency_map.fetch(_1) } end |
#sources ⇒ Array<Source>
19 20 21 |
# File 'lib/diver_down/web/definition_module_dependencies.rb', line 19 def sources @source_map.keys.sort.map { @source_map.fetch(_1) } end |