def resolve_files(file_or_dir_path, options = {}, &block)
      options = {
        # Set to :template when calling to consider references to template
        # files from an import library
        import: false
      }.merge(options)
      [file_or_dir_path].flatten.each do |file_or_dir_path|
        path = inject_import_path(file_or_dir_path, type: options[:import]) if options[:import]
        path = clean_path_to(file_or_dir_path, options)
        self.base_directory = path unless options[:internal_call]
        if path.directory?
          Dir.glob("#{path}/*").sort.each do |file|
            resolve_files(file, { internal_call: true }.merge(options), &block)
          end
        else
          # Ignore files with the given prefix if supplied, but only if this is a file that
          # has been found, if explicitly asked to compile a file from the caller do it regardless
          if options[:ignore_with_prefix] && options[:internal_call]
            return nil if path.basename.to_s =~ /^#{options[:ignore_with_prefix]}/
          end
          yield path
        end
      end
    end
def resolve_files(file_or_dir_path, options = {}, &block)
      options = {
        # Set to :template when calling to consider references to template
        # files from an import library
        import: false
      }.merge(options)
      [file_or_dir_path].flatten.each do |file_or_dir_path|
        path = inject_import_path(file_or_dir_path, type: options[:import]) if options[:import]
        path = clean_path_to(file_or_dir_path, options)
        self.base_directory = path unless options[:internal_call]
        if path.directory?
          Dir.glob("#{path}/*").sort.each do |file|
            resolve_files(file, { internal_call: true }.merge(options), &block)
          end
        else
          # Ignore files with the given prefix if supplied, but only if this is a file that
          # has been found, if explicitly asked to compile a file from the caller do it regardless
          if options[:ignore_with_prefix] && options[:internal_call]
            return nil if path.basename.to_s =~ /^#{options[:ignore_with_prefix]}/
          end
          yield path
        end
      end
    end
Yields absolute paths to the given file or directory. If a directory is supplied
 the method will recurse into the sub directories and ultimately yield
 every file contained within the directory and its children.