Class: ZMQ::Device::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/zdevice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conf = {}) ⇒ Context

Returns a new instance of Context.



41
42
43
44
45
46
# File 'lib/zdevice.rb', line 41

def initialize(conf = {})
  @iothreads = conf[:iothreads] || 1
  @verbose   = conf[:verbose]   || false

  @ctx = ZMQ::Context.new(@iothreads)
end

Instance Attribute Details

#ctxObject (readonly)

Returns the value of attribute ctx.



40
41
42
# File 'lib/zdevice.rb', line 40

def ctx
  @ctx
end

#iothreadsObject (readonly)

Returns the value of attribute iothreads.



40
41
42
# File 'lib/zdevice.rb', line 40

def iothreads
  @iothreads
end

#verboseObject (readonly)

Returns the value of attribute verbose.



40
41
42
# File 'lib/zdevice.rb', line 40

def verbose
  @verbose
end