Class: ArchUnit::Files::FluentApi::CustomFileCondition
- Inherits:
-
Object
- Object
- ArchUnit::Files::FluentApi::CustomFileCondition
- Includes:
- Common::FluentApi::Checkable
- Defined in:
- lib/archunit/files/fluentapi/custom_file_condition.rb
Overview
Executable custom predicate evaluated against immutable FileInfo values.
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#is_negated ⇒ Object
readonly
Returns the value of attribute is_negated.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#project_locator ⇒ Object
readonly
Returns the value of attribute project_locator.
-
#subject_filters ⇒ Object
readonly
Returns the value of attribute subject_filters.
Instance Method Summary collapse
-
#initialize(mood, condition:, message:) ⇒ CustomFileCondition
constructor
A new instance of CustomFileCondition.
- #negated? ⇒ Boolean
Methods included from Common::FluentApi::Checkable
Constructor Details
#initialize(mood, condition:, message:) ⇒ CustomFileCondition
Returns a new instance of CustomFileCondition.
19 20 21 22 23 24 25 26 27 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 19 def initialize(mood, condition:, message:) validate_mood(mood) @project_locator = mood.project_locator @subject_filters = mood.filters @condition = callable_value(condition) @message = () @is_negated = mood.negated? freeze end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
17 18 19 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 17 def condition @condition end |
#is_negated ⇒ Object (readonly)
Returns the value of attribute is_negated.
17 18 19 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 17 def is_negated @is_negated end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
17 18 19 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 17 def @message end |
#project_locator ⇒ Object (readonly)
Returns the value of attribute project_locator.
17 18 19 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 17 def project_locator @project_locator end |
#subject_filters ⇒ Object (readonly)
Returns the value of attribute subject_filters.
17 18 19 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 17 def subject_filters @subject_filters end |
Instance Method Details
#negated? ⇒ Boolean
29 30 31 |
# File 'lib/archunit/files/fluentapi/custom_file_condition.rb', line 29 def negated? is_negated end |