Class: ArchUnit::GraphReporting::Projection::FolderDepthCollapse
- Inherits:
-
Data
- Object
- Data
- ArchUnit::GraphReporting::Projection::FolderDepthCollapse
- Defined in:
- lib/archunit/graph/projection/folder_depth_collapse.rb
Overview
Collapse file nodes to their folder path at a fixed depth.
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Returns the value of attribute depth.
Instance Method Summary collapse
-
#initialize(depth:) ⇒ FolderDepthCollapse
constructor
A new instance of FolderDepthCollapse.
Constructor Details
#initialize(depth:) ⇒ FolderDepthCollapse
Returns a new instance of FolderDepthCollapse.
8 9 10 11 12 13 14 |
# File 'lib/archunit/graph/projection/folder_depth_collapse.rb', line 8 def initialize(depth:) unless depth.is_a?(Integer) && depth.positive? raise ArgumentError, 'depth must be a positive Integer' end super end |
Instance Attribute Details
#depth ⇒ Object (readonly)
Returns the value of attribute depth
7 8 9 |
# File 'lib/archunit/graph/projection/folder_depth_collapse.rb', line 7 def depth @depth end |