Class: Contrast::Agent::Reporting::Settings::Keyword
- Defined in:
- lib/contrast/agent/reporting/settings/keyword.rb
Overview
The words to search for in input that indicate an attack
Direct Known Subclasses
Constant Summary collapse
- ATTRIBUTES =
%i[id value case_sensitive score prohibited_features mandatory_features].cs__freeze
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Object
Returns the value of attribute case_sensitive.
-
#id ⇒ Object
Returns the value of attribute id.
-
#score ⇒ Object
higher meaning more likely to be an attack.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#mandatory_features ⇒ Array<String>
Disable this pattern or keyword if agent implements one of the specified features.
-
#mandatory_features=(features) ⇒ Array<String>
Set the features.
-
#prohibited_features ⇒ Array<String>
Disable this pattern or keyword if agent implements one of the specified features.
-
#prohibited_features=(features) ⇒ Array<String>
Set the features.
- #to_controlled_hash ⇒ Object
Instance Attribute Details
#case_sensitive ⇒ Object
Returns the value of attribute case_sensitive.
19 20 21 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 19 def case_sensitive @case_sensitive end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 15 def id @id end |
#score ⇒ Object
higher meaning more likely to be an attack
22 23 24 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 22 def score @score end |
#value ⇒ Object
Returns the value of attribute value.
17 18 19 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 17 def value @value end |
Instance Method Details
#mandatory_features ⇒ Array<String>
Disable this pattern or keyword if agent implements one of the specified features
36 37 38 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 36 def mandatory_features @_mandatory_features ||= [] end |
#mandatory_features=(features) ⇒ Array<String>
Set the features.
52 53 54 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 52 def mandatory_features= features @_mandatory_features = features if features.is_a?(Array) end |
#prohibited_features ⇒ Array<String>
Disable this pattern or keyword if agent implements one of the specified features
28 29 30 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 28 def prohibited_features @_prohibited_features ||= [] end |
#prohibited_features=(features) ⇒ Array<String>
Set the features.
44 45 46 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 44 def prohibited_features= features @_prohibited_features = features if features.is_a?(Array) end |
#to_controlled_hash ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/contrast/agent/reporting/settings/keyword.rb', line 56 def to_controlled_hash { id: id, value: value, caseSensitive: case_sensitive, score: score, prohibitedFeatures: prohibited_features, mandatoryFeatures: mandatory_features } end |