Class: Contrast::Agent::Reporting::Settings::VirtualPatch
- Defined in:
- lib/contrast/agent/reporting/settings/virtual_patch.rb
Overview
The settings for each virtual patch in the agent.
Instance Attribute Summary collapse
- #key ⇒ String readonly
- #name ⇒ String readonly
- #uuid ⇒ String readonly
Instance Method Summary collapse
- #headers ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
-
#initialize(hash) ⇒ VirtualPatch
constructor
A new instance of VirtualPatch.
- #parameters ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
- #urls ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
Constructor Details
#initialize(hash) ⇒ VirtualPatch
Returns a new instance of VirtualPatch.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 20 def initialize hash @name = hash[:name] @key = hash[:key] @uuid = hash[:uuid] hash[:headers]&.each do |header_json| headers << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end hash[:parameters]&.each do |header_json| parameters << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end hash[:urls]&.each do |header_json| urls << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end end |
Instance Attribute Details
#key ⇒ String (readonly)
16 17 18 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 16 def key @key end |
#name ⇒ String (readonly)
14 15 16 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 14 def name @name end |
#uuid ⇒ String (readonly)
18 19 20 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 18 def uuid @uuid end |
Instance Method Details
#headers ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
39 40 41 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 39 def headers @_headers ||= [] end |
#parameters ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
44 45 46 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 44 def parameters @_parameters ||= [] end |
#urls ⇒ Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>
49 50 51 |
# File 'lib/contrast/agent/reporting/settings/virtual_patch.rb', line 49 def urls @_urls ||= [] end |