class VFS::FileCollectorEntry

vfs file collector entry

Attributes

framework_path[R]
real_headers[R]
real_modules[R]

Public Class Methods

new(framework_path, real_modules, real_headers) click to toggle source
# File lib/yaml-vfs/file_collector.rb, line 24
def initialize(framework_path, real_modules, real_headers)
  raise ArgumentError, 'framework_path must set' if framework_path.nil?
  raise ArgumentError, 'real_modules and real_headers must set' if real_modules.empty?

  @real_headers = real_headers
  @framework_path = Pathname(framework_path)
  @real_modules = real_modules
end
new_from_real_headers_dir(framework_path, real_modules_dir, real_header_dir) click to toggle source
# File lib/yaml-vfs/file_collector.rb, line 13
def self.new_from_real_headers_dir(framework_path, real_modules_dir, real_header_dir)
  raise ArgumentError, 'real_header_dir must set and exist' if real_header_dir.nil? || !real_header_dir.exist?
  raise ArgumentError, 'real_modules_dir must set and exist' if real_modules_dir.nil? || !real_modules_dir.exist?

  files = Pathname.glob(Pathname(real_header_dir).join('**').join('*')).select do |file|
    HEADER_FILES_EXTENSIONS.include?(file.extname)
  end
  real_modules = Pathname(real_modules_dir).glob('module*.modulemap')
  new(framework_path, real_modules, files)
end