Method: Jets::Builders::HandlerGenerator#poly_shims

Defined in:
lib/jets/builders/handler_generator.rb

#poly_shimsObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/jets/builders/handler_generator.rb', line 62

def poly_shims
  missing = []

  app_files.each do |path|
    vars = Jets::Builders::ShimVars::App.new(path)
    poly_tasks = vars.klass.tasks.select { |t| t.lang != :ruby }
    poly_tasks.each do |task|
      source_path = get_source_path(path, task)
      if File.exist?(source_path)
        native_function(path, task)
      else
        missing << source_path
      end
    end

    unless missing.empty?
      puts "ERROR: Missing source files. Please make sure these source files exist or remove their declarations".color(:red)
      puts missing
      exit 1
    end
  end
end