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(hive: Hive.default, expression:) ⇒ Participant

Returns a new instance of Participant.



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

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

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



3
4
5
# File 'lib/swarm/participant.rb', line 3

def expression
  @expression
end

#hiveObject (readonly)

Returns the value of attribute hive.



3
4
5
# File 'lib/swarm/participant.rb', line 3

def hive
  @hive
end

Instance Method Details

#argumentsObject



14
15
16
# File 'lib/swarm/participant.rb', line 14

def arguments
  expression.arguments
end

#workitemObject



10
11
12
# File 'lib/swarm/participant.rb', line 10

def workitem
  expression.workitem
end