Class: ArchUnit::Files::FluentApi::MatchPatternFileCondition

Inherits:
Object
  • Object
show all
Includes:
Common::FluentApi::Checkable
Defined in:
lib/archunit/files/fluentapi/match_pattern_file_condition.rb

Overview

Executable file name or location predicate for either mood.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common::FluentApi::Checkable

#check

Constructor Details

#initialize(mood, check_filter:) ⇒ MatchPatternFileCondition

Returns a new instance of MatchPatternFileCondition.



18
19
20
21
22
23
24
25
26
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 18

def initialize(mood, check_filter:)
  validate_mood(mood)
  validate_check_filter(check_filter)
  @project_locator = mood.project_locator
  @filters = mood.filters
  @check_filter = check_filter
  @is_negated = mood.negated?
  freeze
end

Instance Attribute Details

#check_filterObject (readonly)

Returns the value of attribute check_filter.



16
17
18
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 16

def check_filter
  @check_filter
end

#filtersObject (readonly)

Returns the value of attribute filters.



16
17
18
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 16

def filters
  @filters
end

#is_negatedObject (readonly)

Returns the value of attribute is_negated.



16
17
18
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 16

def is_negated
  @is_negated
end

#project_locatorObject (readonly)

Returns the value of attribute project_locator.



16
17
18
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 16

def project_locator
  @project_locator
end

Instance Method Details

#negated?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/archunit/files/fluentapi/match_pattern_file_condition.rb', line 28

def negated?
  is_negated
end