Method: Jets::Builders::HandlerGenerator#native_function

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

#native_function(original_path, task) ⇒ Object

Builds and copies over the native source code: python or node



145
146
147
148
149
150
151
# File 'lib/jets/builders/handler_generator.rb', line 145

def native_function(original_path, task)
  source_path = get_source_path(original_path, task)
  # Handler: handlers/controllers/posts_controller.handle
  dest_path = "#{tmp_code}/#{task.handler_path}"
  FileUtils.mkdir_p(File.dirname(dest_path))
  FileUtils.cp(source_path, dest_path)
end