Class: Datadog::AppSec::Reactive::AddressHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/datadog/appsec/reactive/address_hash.rb

Overview

AddressHash for Reactive Engine

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*arguments, &block) ⇒ Object



8
9
10
# File 'lib/datadog/appsec/reactive/address_hash.rb', line 8

def self.new(*arguments, &block)
  super { |h, k| h[k] = [] }
end

Instance Method Details

#addressesObject



12
13
14
# File 'lib/datadog/appsec/reactive/address_hash.rb', line 12

def addresses
  keys.flatten
end

#with(address) ⇒ Object



16
17
18
# File 'lib/datadog/appsec/reactive/address_hash.rb', line 16

def with(address)
  keys.select { |k| k.include?(address) }
end