lib/abide_dev_utils/xccdf/diff/benchmark.rb
def validate_profile_obj(obj, level, profile)
          return LVL_PROF_DEFAULT if obj.nil?
          return validate_profile_objs(obj, level, profile) if obj.respond_to?(:each)

          validated_level = valid_level?(obj, level) ? obj.level : nil
          validated_profile = valid_profile?(obj, profile) ? obj.title.to_s : nil
          [validated_level, validated_profile]
        end
# Returns array (or array of arrays) of valid level and valid profile based on child's linked profiles
# @param obj [Object] AbideDevUtils::XCCDF::Parser::Objects::Profile objects or array of them
# @param level [String] a profile level
# @param profile [String] a partial / full profile title
# @return [Array] two-item array: first item - Profile level or nil, second item - Profile title or nil
# @return [Array] Array of two item arrays if `obj` is an array of profiles
Returns array (or array of arrays) of valid level and valid profile based on child's linked profiles
Returns array ( or array of arrays ) of valid level and valid profile based on child ' s linked profiles
def validate_profile_obj(obj, level, profile)
          return LVL_PROF_DEFAULT if obj.nil?
          return validate_profile_objs(obj, level, profile) if obj.respond_to?(:each)
          validated_level = valid_level?(obj, level) ? obj.level : nil
          validated_profile = valid_profile?(obj, profile) ? obj.title.to_s : nil
          [validated_level, validated_profile]
        end
def validate_profile_obj ( obj , level , profile ) return LVL_PROF_DEFAULT if obj . nil? return validate_profile_objs ( obj , level , profile ) if obj . respond_to? ( :each ) validated_level = valid_level? ( obj , level ) ? obj . level : nil validated_profile = valid_profile? ( obj , profile ) ? obj . title . to_s : nil [ validated_level , validated_profile ] end
Returns array (or array of arrays) of valid level and valid profile based on child's linked profiles
Returns array ( or array of arrays ) of valid level and valid profile based on child ' s linked profiles
two-item array: first item - Profile level or nil, second item - Profile title or nil
two - item array : first item - Profile level or nil second item - Profile title or nil
Array
Array of two item arrays if `obj` is an array of profiles
Array of two item arrays if ` obj ` is an array of profiles
Array
obj
:XCCDF::Parser::Objects::Profile objects or array of them
: XCCDF :: Parser :: Objects :: Profile objects or array of them
level
a profile level
a profile level
profile
a partial / full profile title
a partial / full profile title