templates/hello_world_function.rb.erb in shatter-rb-0.0.2 vs templates/hello_world_function.rb.erb in shatter-rb-0.1.0

- old
+ new

@@ -1,17 +1,9 @@ -require "pg" -require "shatter/service/function" -require "shatter/service/function_params" +class HelloWorldFunction < Shatter::Service::Function + define_param :name, nullable: false, type: 'string' + define_param :number, nullable: false, type: 'integer' -module <%= app_name %> - module Functions - class HelloWorldFunction < Shatter::Service::Function - define_param :name, nullable: false, type: 'string' - define_param :number, nullable: false, type: 'integer' - - def invoke - params.to_h => name:, uuid: - { result: "Hello #{name}", uuid:, error: nil, uuid: } - end - end + def invoke + params.to_h => name:, uuid: + { result: "Hello #{name}", error: nil, uuid: } end end \ No newline at end of file