Method: Contrast::Agent::Reporting::Settings::VirtualPatch#initialize
- Defined in:
- lib/contrast/agent/reporting/settings/virtual_patch.rb
#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 |