Class: Swarm::Participant

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

Direct Known Subclasses

StorageParticipant, TraceParticipant

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:, hive: Hive.default) ⇒ Participant

Returns a new instance of Participant.



7
8
9
10
# File 'lib/swarm/participant.rb', line 7

def initialize(expression:, hive: Hive.default)
  @hive = hive
  @expression = expression
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



5
6
7
# File 'lib/swarm/participant.rb', line 5

def expression
  @expression
end

#hiveObject (readonly)

Returns the value of attribute hive.



5
6
7
# File 'lib/swarm/participant.rb', line 5

def hive
  @hive
end

Instance Method Details

#argumentsObject



16
17
18
# File 'lib/swarm/participant.rb', line 16

def arguments
  expression.arguments
end

#workitemObject



12
13
14
# File 'lib/swarm/participant.rb', line 12

def workitem
  expression.workitem
end