class XRBP::WebSocket::Cmds::Ledger
Retrieve information about the public ledger
Attributes
args[RW]
ledger_index[RW]
Public Class Methods
new(ledger_index=nil, args={})
click to toggle source
Calls superclass method
# File lib/xrbp/websocket/cmds/ledger.rb, line 10 def initialize(ledger_index=nil, args={}) @ledger_index = ledger_index @args = args super(to_h) end
Public Instance Methods
ledger_index?()
click to toggle source
# File lib/xrbp/websocket/cmds/ledger.rb, line 16 def ledger_index? !!ledger_index end
to_h()
click to toggle source
# File lib/xrbp/websocket/cmds/ledger.rb, line 20 def to_h h = args.merge(:command => :ledger) h['ledger_index'] = ledger_index if ledger_index? return h end