Sha256: 446814294b453d69dea3ffd0a4acb98af37388193e45b01090068c2828ece05e
Contents?: true
Size: 553 Bytes
Versions: 18
Compression:
Stored size: 553 Bytes
Contents
module Datadog # Namespace for handling application environment module Environment # Defines helper methods for environment module Helpers def env_to_bool(var, default = nil) ENV.key?(var) ? ENV[var].to_s.downcase == 'true' : default end def env_to_float(var, default = nil) ENV.key?(var) ? ENV[var].to_f : default end def env_to_list(var, default = []) if ENV.key?(var) ENV[var].split(',').map(&:strip) else default end end end end end
Version data entries
18 entries across 18 versions & 2 rubygems