def _load_asset(type, path_or_name)
      asset_found = false

      if File.file?(File.expand_path(path_or_name))
        # If the file exists, we're assuming that the user
        # passed a filepath.
        asset_found = true
        asset_path = File.expand_path(path_or_name)
        asset_name = File.basename(path_or_name, '.*').camelize
      end

      unless asset_found
        # If the file doesn't exist, look to see if it's been
        # pre-registered.
        symbol = File.basename(path_or_name, '.*').camelize.to_sym
        case type
        when Pref::ASSET_TYPE_ACTION
          if CLIUtils::Prefs.registered_actions.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_actions[symbol][:path]
            asset_name = CLIUtils::Prefs.registered_actions[symbol][:class]
          end
        when Pref::ASSET_TYPE_BEHAVIOR
          if CLIUtils::Prefs.registered_behaviors.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_behaviors[symbol][:path] rescue ''
            asset_name = CLIUtils::Prefs.registered_behaviors[symbol][:class] rescue ''
          end
        when Pref::ASSET_TYPE_VALIDATOR
          if CLIUtils::Prefs.registered_validators.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_validators[symbol][:path] rescue ''
            asset_name = CLIUtils::Prefs.registered_validators[symbol][:class] rescue ''
          end
        end
      end

      unless asset_found
        # If the file doesn't exist and there's no pre-registered
        # asset, as a last check, look for it as a built-in asset.
        _default =  File.join(File.dirname(__FILE__), "pref_#{ @@asset_labels[type][:file_suffix] }s")
        asset_path = File.join(_default, "#{ path_or_name }_#{ @@asset_labels[type][:file_suffix] }")
        asset_name = "#{ path_or_name.camelize }#{ @@asset_labels[type][:class_suffix] }"
      end

      # Try to load and instantiate the asset. If that fails, warn
      # the user with a message and skip over it.
      begin
        require File.expand_path(asset_path)
        Object.const_get('CLIUtils').const_get(asset_name).new
      rescue LoadError => e
        messenger.warn("Skipping undefined Pref #{ @@asset_labels[type][:class_suffix] }: #{ path_or_name }")
        nil
      end
    end
def _load_asset(type, path_or_name)
      asset_found = false

      if File.file?(File.expand_path(path_or_name))
        # If the file exists, we're assuming that the user
        # passed a filepath.
        asset_found = true
        asset_path = File.expand_path(path_or_name)
        asset_name = File.basename(path_or_name, '.*').camelize
      end

      unless asset_found
        # If the file doesn't exist, look to see if it's been
        # pre-registered.
        symbol = File.basename(path_or_name, '.*').camelize.to_sym
        case type
        when Pref::ASSET_TYPE_ACTION
          if CLIUtils::Prefs.registered_actions.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_actions[symbol][:path]
            asset_name = CLIUtils::Prefs.registered_actions[symbol][:class]
          end
        when Pref::ASSET_TYPE_BEHAVIOR
          if CLIUtils::Prefs.registered_behaviors.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_behaviors[symbol][:path] rescue ''
            asset_name = CLIUtils::Prefs.registered_behaviors[symbol][:class] rescue ''
          end
        when Pref::ASSET_TYPE_VALIDATOR
          if CLIUtils::Prefs.registered_validators.key?(symbol)
            asset_found = true
            asset_path = CLIUtils::Prefs.registered_validators[symbol][:path] rescue ''
            asset_name = CLIUtils::Prefs.registered_validators[symbol][:class] rescue ''
          end
        end
      end

      unless asset_found
        # If the file doesn't exist and there's no pre-registered
        # asset, as a last check, look for it as a built-in asset.
        _default =  File.join(File.dirname(__FILE__), "pref_#{ @@asset_labels[type][:file_suffix] }s")
        asset_path = File.join(_default, "#{ path_or_name }_#{ @@asset_labels[type][:file_suffix] }")
        asset_name = "#{ path_or_name.camelize }#{ @@asset_labels[type][:class_suffix] }"
      end

      # Try to load and instantiate the asset. If that fails, warn
      # the user with a message and skip over it.
      begin
        require File.expand_path(asset_path)
        Object.const_get('CLIUtils').const_get(asset_name).new
      rescue LoadError => e
        messenger.warn("Skipping undefined Pref #{ @@asset_labels[type][:class_suffix] }: #{ path_or_name }")
        nil
      end
    end
General function to load an asset (a Validator or Behavior).
 Note that if an asset isn't found, the user is warned, but
 execution continues.
 @param [Integer] type ASSET_TYPE_BEHAVIOR or ASSET_TYPE_VALIDATOR
 @param [String] path_or_name The path to or name of the asset
 @return [Object]