Module: Porkadot::Configs::CertsUtils

Instance Method Summary collapse

Instance Method Details

#certs_root_dirObject



7
8
9
# File 'lib/porkadot/configs/certs.rb', line 7

def certs_root_dir
  File.join(self.config.secrets_root_dir, 'certs')
end

#ipaddr?(addr) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
19
# File 'lib/porkadot/configs/certs.rb', line 11

def ipaddr?(addr)
  if addr.nil?
    return false
  end
  IPAddr.new(addr)
  return true
rescue IPAddr::InvalidAddressError
  return false
end