Class: Flor::Pro::ArrayQmark
- Inherits:
-
Flor::Procedure
- Object
- Node
- Flor::Procedure
- Flor::Pro::ArrayQmark
- Defined in:
- lib/flor/pcore/array_qmark.rb
Constant Summary
Constants inherited from Flor::Procedure
Flor::Procedure::RVARS, Flor::Procedure::TRUE_ATTS
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #pre_execute ⇒ Object
- #receive_last ⇒ Object
-
#receive_payload_ret ⇒ Object
don’t duplicate the ret.
Methods inherited from Flor::Procedure
[], core?, #debug_msg, #debug_tree, #end, #flank, #heap, inherited, make, names, #prepare_on_receive_last, #trigger_on_error
Methods inherited from Node
#child_id, #cnodes, #cnodes_any?, #cnodes_empty?, #deref, #descendant_of?, #domain, #exid, #fei, #from, #h, #initialize, #lookup_tree, #lookup_value, #message_or_node_payload, #nid, #node_closed?, #node_ended?, #node_open?, #node_payload, #node_payload_ret, #node_status, #node_status_flavour, #on_error_parent, #parent, #payload, #payload_ret, #point, #reheap, #to_procedure_node, #tree
Constructor Details
This class inherits a constructor from Flor::Node
Instance Method Details
#pre_execute ⇒ Object
66 67 68 69 70 71 |
# File 'lib/flor/pcore/array_qmark.rb', line 66 def pre_execute @node['ret'] = receive_payload_ret unatt_unkeyed_children end |
#receive_last ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/flor/pcore/array_qmark.rb', line 73 def receive_last t = Flor.type(@node['ret']) r = case h = heap when 'array?', 'list?' then t == :array when 'object?', 'hash?' 'dict?' then t == :object when 'boolean?' then t == :boolean when 'number?' then t == :number when 'string?' then t == :string when 'null?', 'nil?' then t == :null when 'false?' then @node['ret'] == false when 'true?' then @node['ret'] == true when 'pair?' then t == :array && @node['ret'].length == 2 when 'float?' then t == :number && @node['ret'].to_s.index('.') != nil else fail(Flor::FlorError.new("#{h.inspect} not yet implemented", self)) end wrap_reply('ret' => r) end |
#receive_payload_ret ⇒ Object
don’t duplicate the ret
99 |
# File 'lib/flor/pcore/array_qmark.rb', line 99 def receive_payload_ret; payload['ret']; end |