Method: Jets::Builders::HandlerGenerator#copy_simple_function

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

#copy_simple_function(source_path) ⇒ Object

source_path: app/functions/simple.rb



51
52
53
54
55
56
# File 'lib/jets/builders/handler_generator.rb', line 51

def copy_simple_function(source_path)
  # Handler: handlers/controllers/posts_controller.handle
  dest_path = source_path.sub('app/functions', 'handlers/functions')
  FileUtils.mkdir_p(File.dirname(dest_path))
  FileUtils.cp(source_path, dest_path)
end