Sha256: d7b3a27d985869856c1e646190a4ba500e2810f58ad368a2fecdbad18a6a840a
Contents?: true
Size: 935 Bytes
Versions: 8
Compression:
Stored size: 935 Bytes
Contents
require 'spqr/spqr' module Examples module Codegen class EchoAgent include ::SPQR::Manageable qmf_package_name 'examples.codegen' qmf_class_name '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(arg) # Print values of in/out parameters log.debug "echo: arg => #{arg.inspect}" # Assign values to in/out parameters arg ||= "" # Return value log.debug "echo: returning #{arg.inspect}" return arg end expose :echo do |args| args.declare :arg, :lstr, :inout, {} end end end end
Version data entries
8 entries across 8 versions & 1 rubygems