mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
more tutorial
This commit is contained in:
12
examples/tutorial/hello/ruby/func.rb
Normal file
12
examples/tutorial/hello/ruby/func.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
require_relative 'bundle/bundler/setup'
|
||||
require 'json'
|
||||
|
||||
name = "World"
|
||||
|
||||
payload = STDIN.read
|
||||
if payload != ""
|
||||
payload = JSON.parse(payload)
|
||||
name = payload['name']
|
||||
end
|
||||
|
||||
puts "Hello #{name} from Ruby!"
|
||||
Reference in New Issue
Block a user