lib/cli/mastermind/configuration.rb
# Specify that plans exist in the given +directory+.
# Must be a valid directory.
#
# @param directory [String] path to a directory containing planfiles
# @raise [InvalidDirectoryError] if +directory+ is not a directory
Specify that plans exist in the given +directory+.
Must be a valid directory.
Specify that plans exist in the given + directory + . Must be a valid directory .
def plan_files(directory)
          unless Dir.exist? directory
            raise InvalidDirectoryError.new('Invalid plan file directory', directory)
          end
          planfiles = Dir.glob(File.join(directory, '**', "*{#{supported_extensions}}"))
          planfiles.map! { |file| File.expand_path(file) }
          @config.add_plans(planfiles)
        end
def plan_files ( directory ) unless Dir . exist? directory raise InvalidDirectoryError . new ( 'Invalid plan file directory' , directory ) end planfiles = Dir . glob ( File . join ( directory , '**' , "*{#{supported_extensions}}" ) ) planfiles . map! { | file | File . expand_path ( file ) } @config . add_plans ( planfiles ) end
Specify that plans exist in the given +directory+.
Specify that plans exist in the given + directory + .
[InvalidDirectoryError] if +directory+ is not a directory
[ InvalidDirectoryError ] if + directory + is not a directory
directory
path to a directory containing planfiles
path to a directory containing planfiles