Sha256: 8f4651be25458b74d02e6a336e11e0509592415a6e980e6a0086a6069c0b7042

Contents?: true

Size: 578 Bytes

Versions: 22

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

module Libuv
    module Resource


        def resolve(deferred, rc)
            if rc && rc < 0
                deferred.reject(@reactor.lookup_error(rc))
            else
                deferred.resolve(nil)
            end
        end

        def check_result!(rc)
            e = @reactor.lookup_error(rc) unless rc.nil? || rc >= 0
            raise e if e
        end

        def check_result(rc)
            @reactor.lookup_error(rc) unless rc.nil? || rc >= 0
        end

        def to_ptr
            @pointer
        end


    end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
libuv-4.0.9 lib/libuv/mixins/resource.rb
libuv-4.0.2 lib/libuv/mixins/resource.rb
libuv-4.0.1 lib/libuv/mixins/resource.rb
libuv-4.0.0 lib/libuv/mixins/resource.rb
libuv-3.3.0 lib/libuv/mixins/resource.rb
libuv-3.2.4 lib/libuv/mixins/resource.rb
libuv-3.2.3 lib/libuv/mixins/resource.rb
libuv-3.2.2 lib/libuv/mixins/resource.rb
libuv-3.2.1 lib/libuv/mixins/resource.rb
libuv-3.2.0 lib/libuv/mixins/resource.rb
libuv-3.1.9 lib/libuv/mixins/resource.rb
libuv-3.1.8 lib/libuv/mixins/resource.rb
libuv-3.1.7 lib/libuv/mixins/resource.rb
libuv-3.1.6 lib/libuv/mixins/resource.rb
libuv-3.1.5 lib/libuv/mixins/resource.rb
libuv-3.1.4 lib/libuv/mixins/resource.rb
libuv-3.1.3 lib/libuv/mixins/resource.rb
libuv-3.1.2 lib/libuv/mixins/resource.rb
libuv-3.1.1 lib/libuv/mixins/resource.rb
libuv-3.1.0 lib/libuv/mixins/resource.rb