Class: Contrast::Agent::Reporting::Settings::Exclusions
- Defined in:
- lib/contrast/agent/reporting/settings/exclusions.rb
Overview
Application level settings for the Exclusions featureset (ApplicationStartupSettingsExclusions)
Instance Method Summary collapse
-
#input_exclusions ⇒ Object
Cases where rules should be excluded if violated from a given input.
-
#input_exclusions=(new_input_exclusions) ⇒ Object
set the InputExclusions array.
- #to_controlled_hash ⇒ Object
-
#url_exclusions ⇒ Object
A case where rules should be excluded if violated during a call to a given URL.
-
#url_exclusions=(new_url_exclusions) ⇒ Object
set the url_exclusions array.
Instance Method Details
#input_exclusions ⇒ Object
Cases where rules should be excluded if violated from a given input.
Array of InputExclusions
20 21 22 |
# File 'lib/contrast/agent/reporting/settings/exclusions.rb', line 20 def input_exclusions @_input_exclusions ||= [] end |
#input_exclusions=(new_input_exclusions) ⇒ Object
set the InputExclusions array. Pass boolean flag as end element of array for ng endpoint. example: input_exclusions = [array, boolean]
} Array of InputExclusions
38 39 40 41 42 43 44 45 46 |
# File 'lib/contrast/agent/reporting/settings/exclusions.rb', line 38 def input_exclusions= new_input_exclusions # The ng_endpoint check is passed as boolean parameter in the setter method. We need to check and see # if it is set: @_input_exclusions = Contrast::Agent::Reporting::Settings::Helpers.array_to_iv( Contrast::Agent::Reporting::Settings::InputExclusion, input_exclusions, new_input_exclusions, ng_endpoint: new_input_exclusions[-1] == !!new_input_exclusions[-1]) end |
#to_controlled_hash ⇒ Object
76 77 78 79 80 81 |
# File 'lib/contrast/agent/reporting/settings/exclusions.rb', line 76 def to_controlled_hash { inputExceptions: input_exclusions.map(&:to_controlled_hash), urlExceptions: url_exclusions.map(&:to_controlled_hash) } end |
#url_exclusions ⇒ Object
A case where rules should be excluded if violated during a call to a given URL.
51 52 53 |
# File 'lib/contrast/agent/reporting/settings/exclusions.rb', line 51 def url_exclusions @_url_exclusions ||= [] end |
#url_exclusions=(new_url_exclusions) ⇒ Object
set the url_exclusions array. Pass boolean flag as end element of array for ng endpoint. example: url_exclusions = [array, boolean]
}
68 69 70 71 72 73 74 |
# File 'lib/contrast/agent/reporting/settings/exclusions.rb', line 68 def url_exclusions= new_url_exclusions @_url_exclusions = Contrast::Agent::Reporting::Settings::Helpers.array_to_iv( Contrast::Agent::Reporting::Settings::UrlExclusion, url_exclusions, new_url_exclusions, ng_endpoint: new_url_exclusions[-1] == !!new_url_exclusions[-1]) end |