def src_directories(main_dir, sub_dirs, params={})
      if params[:subdir_only]
        all_dirs=[]
      else
        all_dirs = [main_dir]
      end

      sub_dirs.each do |dir|
        all_dirs << "#{main_dir}/#{dir}"
      end
      all_dirs.compact
    end
def src_directories(main_dir, sub_dirs, params={})
      if params[:subdir_only]
        all_dirs=[]
      else
        all_dirs = [main_dir]
      end

      sub_dirs.each do |dir|
        all_dirs << "#{main_dir}/#{dir}"
      end
      all_dirs.compact
    end
Returns array of source code directories assembled via given parameters

 @param [String] main_dir                Main directory where project source is located
 @param [Array]  sub_dirs                List of sub directories inside main_dir
 @param [Hash]   params                  Option hash to control how directories should be added
 @option params [Boolean]  :subdir_only  If true: only return sub directories, not main_dir in result

 @return [Array] List of sub directories assembled from each element in sub_dirs and appended to main_dir