class Burrow::Request
Attributes
method[R]
params[R]
Public Class Methods
new(method, params={})
click to toggle source
# File lib/burrow/request.rb, line 5 def initialize(method, params={}) @method = method @params = params end
Public Instance Methods
attributes()
click to toggle source
# File lib/burrow/request.rb, line 14 def attributes { jsonrpc: '2.0', id: id, method: method, params: params } end
id()
click to toggle source
# File lib/burrow/request.rb, line 10 def id @id ||= SecureRandom.hex end
json()
click to toggle source
# File lib/burrow/request.rb, line 22 def json JSON.generate(attributes) end