Module: RPC

Defined in:
lib/rpc/lib/rpc/clients/em-http-request.rb,
lib/rpc/lib/rpc.rb,
lib/rpc/lib/rpc/encoders/json.rb,
lib/rpc/lib/rpc/clients/socket.rb,
lib/rpc/lib/rpc/clients/net-http.rb

Overview

Note that we support only HTTP POST. JSON-RPC can be done via HTTP GET as well, but since HTTP POST is the preferred method, I decided to implement only it. More info can is here: groups.google.com/group/json-rpc/web/json-rpc-over-http

Defined Under Namespace

Modules: Clients, Encoders, ExceptionsMixin Classes: Client, Server

Class Method Summary (collapse)

Class Method Details

+ (Object) development=(boolean)



26
27
28
# File 'lib/rpc/lib/rpc.rb', line 26

def self.development=(boolean)
  @development = boolean
end

+ (Boolean) development?



30
31
32
# File 'lib/rpc/lib/rpc.rb', line 30

def self.development?
  !! @development
end

+ (Object) full_const_get(const_name)



34
35
36
37
38
39
# File 'lib/rpc/lib/rpc.rb', line 34

def self.full_const_get(const_name)
  parts = const_name.sub(/^::/, "").split("::")
  parts.reduce(Object) do |constant, part|
    constant.const_get(part)
  end
end

+ (Object) log(message)



22
23
24
# File 'lib/rpc/lib/rpc.rb', line 22

def self.log(message)
  STDERR.puts(message) if self.logging
end

+ (Object) logging



14
15
16
# File 'lib/rpc/lib/rpc.rb', line 14

def self.logging
  @logging ||= $DEBUG
end

+ (Object) logging=(boolean)



18
19
20
# File 'lib/rpc/lib/rpc.rb', line 18

def self.logging=(boolean)
  @logging = boolean
end