Class: ArchUnit::Slices::Uml::PlantUmlDiagram
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Slices::Uml::PlantUmlDiagram
- Defined in:
- lib/archunit/slices/uml/plant_uml_diagram.rb
Overview
Immutable component names and allowed directed dependencies parsed from PlantUML.
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
Instance Method Summary collapse
- #allows?(source, target) ⇒ Boolean
-
#initialize(components: [], dependencies: []) ⇒ PlantUmlDiagram
constructor
A new instance of PlantUmlDiagram.
Constructor Details
#initialize(components: [], dependencies: []) ⇒ PlantUmlDiagram
Returns a new instance of PlantUmlDiagram.
11 12 13 14 15 |
# File 'lib/archunit/slices/uml/plant_uml_diagram.rb', line 11 def initialize(components: [], dependencies: []) dependencies = immutable_dependencies(dependencies) components = immutable_components(components, dependencies) super end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components
10 11 12 |
# File 'lib/archunit/slices/uml/plant_uml_diagram.rb', line 10 def components @components end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies
10 11 12 |
# File 'lib/archunit/slices/uml/plant_uml_diagram.rb', line 10 def dependencies @dependencies end |
Instance Method Details
#allows?(source, target) ⇒ Boolean
17 18 19 |
# File 'lib/archunit/slices/uml/plant_uml_diagram.rb', line 17 def allows?(source, target) dependencies.include?(PlantUmlDependency.new(source:, target:)) end |