Class: Bones::RPC::Protocol::Notify
- Inherits:
-
Object
- Object
- Bones::RPC::Protocol::Notify
- Includes:
- AdapterHelper
- Defined in:
- lib/bones/rpc/protocol/notify.rb
Instance Method Summary collapse
-
#initialize(method, params) ⇒ Notify
constructor
A new instance of Notify.
- #log_inspect ⇒ Object
- #op_code ⇒ Object
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_inspect ⇒ Object
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_code ⇒ Object
21 22 23 |
# File 'lib/bones/rpc/protocol/notify.rb', line 21 def op_code 2 end |