templates/ruby/web-root/handler.rb in faastruby-0.5.29 vs templates/ruby/web-root/handler.rb in faastruby-0.5.30

- old
+ new

@@ -1,10 +1,6 @@ -require './template' +# frozen_string_literal: true -def handler event - greeting = "Welcome to FaaStRuby Local!" - render html: template('index.html.erb', variables: {greeting: greeting}) +def handler(_event) + greeting = 'Welcome to faastRuby Local!' + render_template 'index.html.erb', variables: { greeting: greeting } end - -def template(file, variables: {}) - Template.new(variables: variables).render(file) -end \ No newline at end of file