Module: Pione::TestHelper::Tuple

Defined in:
lib/pione/test-helper/tuple-helper.rb

Class Method Summary collapse

Class Method Details

.task(package_id, rule_name, inputs, param_set = nil, features = nil, caller_id = 'root') ⇒ Object



4
5
6
7
8
9
10
# File 'lib/pione/test-helper/tuple-helper.rb', line 4

def self.task(package_id, rule_name, inputs, param_set=nil, features=nil, caller_id='root')
  param_set = Pione::Lang::ParameterSet.new unless param_set
  features = Pione::Lang::FeatureSequence.new unless features
  digest = Util::TaskDigest.generate(package_id, rule_name, inputs, param_set)
  domain_id = Util::DomainID.generate(package_id, rule_name, inputs, param_set)
  Pione::TupleSpace::TaskTuple.new(digest, package_id, rule_name, inputs, param_set, features, domain_id, caller_id)
end