class Electrb::Error

Attributes

id[RW]
jsonrpc[RW]

Public Class Methods

from(hash) click to toggle source

generate error form hash. @param [Hash] hash hash of error. @return [Electrb::Error]

# File lib/electrb.rb, line 14
def self.from(hash)
  e = Electrb::Error.new(hash['error'])
  e.id = hash['id']
  e.jsonrpc = hash['jsonrpc']
  e
end