Class: Wurk::Topology::Slot

Inherits:
Struct
  • Object
show all
Defined in:
lib/wurk/topology.rb

Overview

‘:count` shadows Struct#count by design — Slot is a kw-init data carrier and the slot’s child-count is the field users read.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#concurrencyObject

Returns the value of attribute concurrency

Returns:

  • (Object)

    the current value of concurrency



18
19
20
# File 'lib/wurk/topology.rb', line 18

def concurrency
  @concurrency
end

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



18
19
20
# File 'lib/wurk/topology.rb', line 18

def count
  @count
end

#queuesObject

Returns the value of attribute queues

Returns:

  • (Object)

    the current value of queues



18
19
20
# File 'lib/wurk/topology.rb', line 18

def queues
  @queues
end

Instance Method Details

#to_hObject



19
20
21
# File 'lib/wurk/topology.rb', line 19

def to_h
  { count: count, queues: queues, concurrency: concurrency }
end