Sha256: 259175b09014b7452205fafab7a742c3d3e0ead03ae8482d5fdf2b1d5366dcbc

Contents?: true

Size: 313 Bytes

Versions: 53

Compression:

Stored size: 313 Bytes

Contents

module Alula
  class RpcResponse
    attr_accessor :request_id, :result, :data

    def initialize(response)
      @request_id = response.data['id']
      @result = response.data['result']
    end

    def ok?
      @result['success'] == true || (@result['errors'].nil? && @result['error'].nil?)
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
alula-ruby-1.9.5 lib/alula/rpc_response.rb
alula-ruby-1.9.4 lib/alula/rpc_response.rb
alula-ruby-1.9.3 lib/alula/rpc_response.rb
alula-ruby-1.9.2 lib/alula/rpc_response.rb
alula-ruby-1.9.1 lib/alula/rpc_response.rb
alula-ruby-1.9.0 lib/alula/rpc_response.rb
alula-ruby-1.8.1 lib/alula/rpc_response.rb
alula-ruby-1.8.0 lib/alula/rpc_response.rb
alula-ruby-1.7.0 lib/alula/rpc_response.rb
alula-ruby-1.6.0 lib/alula/rpc_response.rb
alula-ruby-1.5.0 lib/alula/rpc_response.rb
alula-ruby-1.4.0 lib/alula/rpc_response.rb
alula-ruby-1.3.0 lib/alula/rpc_response.rb
alula-ruby-1.2.4 lib/alula/rpc_response.rb
alula-ruby-1.2.3 lib/alula/rpc_response.rb
alula-ruby-1.2.2 lib/alula/rpc_response.rb
alula-ruby-1.2.1 lib/alula/rpc_response.rb
alula-ruby-1.2.0 lib/alula/rpc_response.rb
alula-ruby-1.1.0 lib/alula/rpc_response.rb
alula-ruby-1.0.2 lib/alula/rpc_response.rb