Sha256: 09faffde7966bef634d714b156b61c92516412a1e70a4c4a49afb9f80ec77469

Contents?: true

Size: 409 Bytes

Versions: 21

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

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

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
alula-ruby-2.1.2 lib/alula/rpc_response.rb
alula-ruby-2.1.1 lib/alula/rpc_response.rb
alula-ruby-2.1.0 lib/alula/rpc_response.rb
alula-ruby-2.0.0 lib/alula/rpc_response.rb
alula-ruby-1.10.5 lib/alula/rpc_response.rb
alula-ruby-1.10.4 lib/alula/rpc_response.rb
alula-ruby-1.10.3 lib/alula/rpc_response.rb
alula-ruby-1.10.2 lib/alula/rpc_response.rb
alula-ruby-1.10.1 lib/alula/rpc_response.rb
alula-ruby-1.10.0 lib/alula/rpc_response.rb
alula-ruby-1.9.17 lib/alula/rpc_response.rb
alula-ruby-1.9.16 lib/alula/rpc_response.rb
alula-ruby-1.9.15 lib/alula/rpc_response.rb
alula-ruby-1.9.14 lib/alula/rpc_response.rb
alula-ruby-1.9.13 lib/alula/rpc_response.rb
alula-ruby-1.9.12 lib/alula/rpc_response.rb
alula-ruby-1.9.11 lib/alula/rpc_response.rb
alula-ruby-1.9.10 lib/alula/rpc_response.rb
alula-ruby-1.9.9 lib/alula/rpc_response.rb
alula-ruby-1.9.8 lib/alula/rpc_response.rb