Sha256: faac9da7000f6e49e20081ef7711deef7bdcf0cb36b47ca577989b8ca6692ff7
Contents?: true
Size: 557 Bytes
Versions: 16
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true require "service_skeleton/config_variable" class ServiceSkeleton::ConfigVariable::Boolean < ServiceSkeleton::ConfigVariable private def pluck_value(env) maybe_default(env) do case env[@name.to_s] when /\A(no|n|off|0|false)\z/i false when /\A(yes|y|on|1|true)\z/i true else raise ServiceSkeleton::Error::InvalidEnvironmentError, "Value #{env[@name.to_s].inspect} for environment variable #{@name} is not a valid boolean value" end end end end
Version data entries
16 entries across 16 versions & 1 rubygems