Class: Swarm::ActivityExpression

Inherits:
Expression show all
Defined in:
lib/swarm/expressions/activity_expression.rb

Instance Attribute Summary

Attributes inherited from HiveDweller

#hive, #id

Instance Method Summary collapse

Methods inherited from Expression

#_apply, #_reply, #apply, #arguments, #branch_position, #command, #evaluator, inherited, #meets_conditions?, #node, #node_at_position, #parent, #replied?, #replied_at, #reply, #reply_to_parent, #root?, storage_type, #tree

Methods inherited from HiveDweller

#==, all, #attributes, #change_attribute, #changed?, create, #delete, each, fetch, ids, inherited, #initialize, many_to_one, #new?, new_from_storage, one_to_many, #reload!, #save, #set_attributes, set_columns, #storage, #storage_id, storage_id_for_key, storage_type, #to_hash

Constructor Details

This class inherits a constructor from Swarm::HiveDweller

Instance Method Details

#workObject



3
4
5
6
7
8
9
# File 'lib/swarm/expressions/activity_expression.rb', line 3

def work
  if command == "trace"
    TraceParticipant.new(hive: hive, expression: self).work
  else
    StorageParticipant.new(hive: hive, expression: self).work
  end
end