bolt-modules/boltlib/lib/puppet/functions/run_plan.rb
# Whether the type is a supported Sensitive type. We only support wrapping parameterized
# and non-parameterized Sensitive types (e.g. Sensitive, Sensitive[String])
Whether the type is a supported Sensitive type. We only support wrapping parameterized
and non-parameterized Sensitive types
Whether the type is a supported Sensitive type . We only support wrapping parameterized and non - parameterized Sensitive types
def sensitive_type?(type_expr)
    (defined?(type_expr.left_expr) && type_expr.left_expr.cased_value == 'Sensitive') ||
      (defined?(type_expr.cased_value) && type_expr.cased_value == 'Sensitive') ||
      type_expr.instance_of?(Puppet::Pops::Types::PSensitiveType)
  end
def sensitive_type? ( type_expr ) ( defined? ( type_expr . left_expr ) && type_expr . left_expr . cased_value == 'Sensitive' ) || ( defined? ( type_expr . cased_value ) && type_expr . cased_value == 'Sensitive' ) || type_expr . instance_of? ( Puppet :: Pops :: Types :: PSensitiveType ) end
Whether the type is a supported Sensitive type.
Whether the type is a supported Sensitive type .
# Parameterized Sensitive type (e.g. Sensitive[String]) # left_expr is defined whenever the type is parameterized. If this is a parameterized # Sensitive type, then we check the cased_value, which is the stringified version of # the left expression's type. # Non-parameterized Sensitive type (Sensitive) # cased_value is defined whenever the type is non-parameterized. If the type expression # defines cased_value, then this is a simple type and we just need to check that it's # Sensitive. # Sensitive type from YAML plans # Type expressions from YAML plans are a different class than those from regular plans. # As long as the type expression is PSensitiveType we can be sure that the type is # either a parameterized or non-parameterized Sensitive type.
type_expr
<not_specific>