class Burrow::Response

Attributes

id[R]
params[R]

Public Class Methods

new(id, params) click to toggle source
# File lib/burrow/response.rb, line 5
def initialize(id, params)
  @id     = id
  @params = params
end

Public Instance Methods

attributes() click to toggle source
# File lib/burrow/response.rb, line 14
def attributes
  {
    id:     id,
    result: params,
    jsonrpc: '2.0'
  }
end
json() click to toggle source
# File lib/burrow/response.rb, line 10
def json
  JSON.generate(attributes)
end