Sha256: f34534b03c72758f37dca79203b38f2a35069815b4fac5065f442edb1fb27d31

Contents?: true

Size: 361 Bytes

Versions: 7

Compression:

Stored size: 361 Bytes

Contents

module CZMQ
  module FFI

    # @return [Boolean] whether the CZMQ DRAFT API is available
    #
    def self.has_draft?
      # NOTE: We use some function that is currently declared DRAFT. Another one
      # might be needed in future versions.
      zsock_new_server(nil)
      true
    rescue NotImplementedError, NoMethodError
      false
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
czmq-ffi-gen-1.1.2 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-1.1.1 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-1.1.0 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-1.1.0.pre1 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-1.0.0 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-0.16.1 lib/czmq-ffi-gen/czmq_ffi_extensions.rb
czmq-ffi-gen-0.16.0 lib/czmq-ffi-gen/czmq_ffi_extensions.rb