module Examples module Codegen class EchoAgent include SPQR::Manageable spqr_package 'examples.codegen' spqr_class 'EchoAgent' # Find method (NB: you must implement this) def EchoAgent.find_by_id(objid) EchoAgent.new end # Find-all method (NB: you must implement this) def EchoAgent.find_all [EchoAgent.new] end ### Schema method declarations # echo returns its argument # * arg (lstr/IO) # def echo(args) # Print values of in/out parameters log.debug "arg => #{args["arg"]}" # # Assign values to in/out parameters args["arg"] = args["arg"] end spqr_expose :echo do |args| args.declare :arg, :lstr, :inout, {} end end end end