Class: Pec::Handler::Networks::AllowedAddressPairs

Inherits:
Object
  • Object
show all
Extended by:
Core
Defined in:
lib/pec/handler/networks/allowed_address_pairs.rb

Instance Attribute Summary

Attributes included from Core

#kind

Class Method Summary collapse

Methods included from Core

build, post_build, recover

Class Method Details

.build(network) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/pec/handler/networks/allowed_address_pairs.rb', line 7

def build(network)
  if network[1]['allowed_address_pairs']
    pairs = network[1]['allowed_address_pairs'].map do |pair|
      { ip_address: pair }
    end
    { allowed_address_pairs: pairs }
  end
end