Added support for Ruby v2 Specialization (#1101)

* Added support for Ruby v2 Specialization
* Added ruby v2 example with builder code
This commit is contained in:
Brendan Stennett
2019-03-13 22:55:26 +08:00
committed by Ta-Ching Chen
parent f104f0b46b
commit c717f182b6
12 changed files with 153 additions and 19 deletions
+13
View File
@@ -0,0 +1,13 @@
# frozen_string_literal: true
require 'nokogiri'
def handler(context)
context.logger.info("Received request")
doc = Nokogiri::XML(context.request.body.read)
ele = doc.at_xpath('//message')
msg = ele.nil? ? 'No Message' : ele.content
Rack::Response.new([msg, "\n"]).finish
end