Class: XRBP::WebSocket::Cmds::Subscribe

Inherits:
XRBP::WebSocket::Command show all
Defined in:
lib/xrbp/websocket/cmds/subscribe.rb

Overview

The subscribe method requests periodic notifications from the server when certain events happen

developers.ripple.com/subscribe.html

Instance Attribute Summary collapse

Attributes inherited from XRBP::WebSocket::Command

#id, #json

Attributes inherited from Message

#bl, #connection, #result, #time

Instance Method Summary collapse

Methods inherited from XRBP::WebSocket::Command

#requesting, #requesting?

Methods inherited from Message

#signal, #to_s, #wait

Constructor Details

#initialize(args = {}) ⇒ Subscribe

Returns a new instance of Subscribe.


11
12
13
14
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 11

def initialize(args={})
  @args = args
  super(to_h)
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.


9
10
11
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 9

def args
  @args
end

Instance Method Details

#to_hObject


16
17
18
# File 'lib/xrbp/websocket/cmds/subscribe.rb', line 16

def to_h
  args.merge(:command => :subscribe)
end