Class: XRBP::WebSocket::Cmds::BookOffers
Overview
Instance Attribute Summary collapse
#id, #json
Attributes inherited from Message
#bl, #connection, #result, #time
Class Method Summary
collapse
Instance Method Summary
collapse
#requesting, #requesting?
Methods inherited from Message
#signal, #to_s, #wait
Constructor Details
#initialize(args = {}) ⇒ BookOffers
17
18
19
20
21
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 17
def initialize(args={})
@args = args
parse_paginate(args)
super(to_h)
end
|
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
15
16
17
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 15
def args
@args
end
|
Class Method Details
.from_h(h) ⇒ Object
23
24
25
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 23
def self.from_h(h)
new Hash[h]
end
|
Instance Method Details
#page_title ⇒ Object
11
12
13
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 11
def page_title
"offers"
end
|
#sanitized_args ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 27
def sanitized_args
sa = Hash[args_without_paginate]
sa[:taker_gets].delete(:issuer) if sa[:taker_gets][:currency] == "XRP"
sa[:taker_pays].delete(:issuer) if sa[:taker_pays][:currency] == "XRP"
sa
end
|
#to_h ⇒ Object
36
37
38
|
# File 'lib/xrbp/websocket/cmds/book_offers.rb', line 36
def to_h
sanitized_args.merge(:command => :book_offers)
end
|