Sha256: 81be43530a9ec4230383ada0e05f1f40285104617097f3fa2de2bb350c81a8a3

Contents?: true

Size: 538 Bytes

Versions: 36

Compression:

Stored size: 538 Bytes

Contents

module Libuv
    module Resource


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

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

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

        def to_ptr
            @pointer
        end


    end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
libuv-1.0.0 lib/libuv/mixins/resource.rb
libuv-0.12.4 lib/libuv/mixins/resource.rb
libuv-0.12.3 lib/libuv/mixins/resource.rb
libuv-0.12.2 lib/libuv/mixins/resource.rb
libuv-0.12.0 lib/libuv/mixins/resource.rb
libuv-0.11.21 lib/libuv/mixins/resource.rb
libuv-0.11.20 lib/libuv/mixins/resource.rb
libuv-0.11.19 lib/libuv/mixins/resource.rb
libuv-0.11.18 lib/libuv/mixins/resource.rb
libuv-0.11.7 lib/libuv/mixins/resource.rb
libuv-0.11.5 lib/libuv/mixins/resource.rb
libuv-0.11.3 lib/libuv/mixins/resource.rb
libuv-0.11.2 lib/libuv/mixins/resource.rb
libuv-0.11.1 lib/libuv/mixins/resource.rb
libuv-0.11.0 lib/libuv/mixins/resource.rb
libuv-0.10.3 lib/libuv/mixins/resource.rb