Class: Bones::RPC::Protocol::Notify

Inherits:
Object
  • Object
show all
Includes:
AdapterHelper
Defined in:
lib/bones/rpc/protocol/notify.rb

Instance Method Summary collapse

Methods included from AdapterHelper

included, #receive_replies, #serialize

Constructor Details

#initialize(method, params) ⇒ Notify

Returns a new instance of Notify.


14
15
16
17
# File 'lib/bones/rpc/protocol/notify.rb', line 14

def initialize(method, params)
  @method = method
  @params = params
end

Instance Method Details

#log_inspectObject


25
26
27
28
29
30
31
32
33
# File 'lib/bones/rpc/protocol/notify.rb', line 25

def log_inspect
  type = "NOTIFY"
  fields = []
  fields << ["%-12s", type]
  fields << ["method=%s", method]
  fields << ["params=%s", params]
  f, v = fields.transpose
  f.join(" ") % v
end

#op_codeObject


21
22
23
# File 'lib/bones/rpc/protocol/notify.rb', line 21

def op_code
  2
end