Class: Tupelo::Client::Worker::Subspace

Inherits:
Object
  • Object
show all
Defined in:
lib/tupelo/client/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metatuple, worker) ⇒ Subspace

Returns a new instance of Subspace.



55
56
57
58
59
60
61
# File 'lib/tupelo/client/worker.rb', line 55

def initialize metatuple, worker
  @metatuple = metatuple
  @tag = metatuple["tag"]

  spec = Marshal.load(Marshal.dump(metatuple["template"]))
  @pot = worker.pot_for(spec).optimize!
end

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag.



53
54
55
# File 'lib/tupelo/client/worker.rb', line 53

def tag
  @tag
end

Instance Method Details

#===(tuple) ⇒ Object



63
64
65
# File 'lib/tupelo/client/worker.rb', line 63

def === tuple
  @pot === tuple
end