Class: Orbjson::CGI_JSON_RPC

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/orbjson.rb

Overview

Manages json-rpc requests sent as a raw post to a CGI application.

Instance Method Summary collapse

Methods included from Common

#format_repsonse, #process

Constructor Details

#initialize(cfg) ⇒ CGI_JSON_RPC

Passes the configuration off to System.init



217
218
219
# File 'lib/orbjson.rb', line 217

def initialize(  cfg  )
   System.init( cfg  )
end

Instance Method Details

#process_requestObject

Takes the raw post data, grabs the JSON-RPC message, and starts the processing



223
224
225
226
227
# File 'lib/orbjson.rb', line 223

def process_request( )
  cgi =  CGI.new
  json   = cgi.raw_post
  process( json )
end