Module: Pione::TupleSpace
- Included in:
- Pione
- Defined in:
- lib/pione/tuple-space.rb,
lib/pione/tuple-space/relay.rb,
lib/pione/tuple-space/basic-tuple.rb,
lib/pione/tuple-space/tuple-space-server.rb,
lib/pione/tuple-space/tuple-space-exception.rb,
lib/pione/tuple-space/tuple-space-interface.rb
Overview
TupleSpace is a namespace for classes tuple space related.
Defined Under Namespace
Modules: TupleDefinition, TupleSpaceInterface, TupleSpaceServerMethod Classes: BasicTuple, DataTuple, ProcessLogTuple, Relay, TupleFormatError, TupleSpaceServer, TupleType
Constant Summary collapse
- TUPLE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
tuple type table
Hash.new
Class Method Summary collapse
-
.[](identifier) ⇒ Class
Returns a tuple class corresponding to a tuple identifier.
-
.from_array(ary) ⇒ TupleObject
Return a tuple data object converted from an array.
-
.identifiers ⇒ Array<Symbol>
Returns identifiers.
Class Method Details
.[](identifier) ⇒ Class
Returns a tuple class corresponding to a tuple identifier.
271 272 273 |
# File 'lib/pione/tuple-space/basic-tuple.rb', line 271 def [](identifier) TUPLE[identifier] end |
.from_array(ary) ⇒ TupleObject
Return a tuple data object converted from an array.
285 286 287 288 289 290 291 292 293 |
# File 'lib/pione/tuple-space/basic-tuple.rb', line 285 def from_array(ary) raise TupleFormatError.new(ary) unless ary.size > 0 raise TupleFormatError.new(ary) unless ary.respond_to?(:to_a) _ary = ary.to_a identifier = _ary.first raise TupleFormatError.new(identifier) unless TUPLE.has_key?(identifier) args = _ary[1..-1] TUPLE[identifier].new(*args) end |