class PactBroker::Webhooks::HttpRequestWithRedactedHeaders
Public Instance Methods
method()
click to toggle source
# File lib/pact_broker/webhooks/http_request_with_redacted_headers.rb, line 12 def method __getobj__().method end
redact?(name)
click to toggle source
# File lib/pact_broker/webhooks/http_request_with_redacted_headers.rb, line 16 def redact? name PactBroker::Domain::WebhookRequest::HEADERS_TO_REDACT.any?{ | pattern | name =~ pattern } end
to_hash()
click to toggle source
# File lib/pact_broker/webhooks/http_request_with_redacted_headers.rb, line 6 def to_hash __getobj__().to_hash.each_with_object({}) do | (key, values), new_hash | new_hash[key] = redact?(key) ? ["**********"] : values end end