Class: ArchUnit::GraphReporting::Projection::FolderDepthCollapse

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

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

#depthObject (readonly)

Returns the value of attribute depth

Returns:

  • (Object)

    the current value of depth



7
8
9
# File 'lib/archunit/graph/projection/folder_depth_collapse.rb', line 7

def depth
  @depth
end