class Flor::Pro::Keys
Public Instance Methods
pre_execute()
click to toggle source
# File lib/flor/pcore/keys.rb, line 33 def pre_execute @node['ret'] = receive_payload_ret unatt_unkeyed_children end
receive_last()
click to toggle source
# File lib/flor/pcore/keys.rb, line 40 def receive_last ret = @node['ret'] fail Flor::FlorError.new( "no argument given", self ) if ret.nil? fail Flor::FlorError.new( "received argument of class #{ret.class}, no #{heap}", self ) unless Flor.is_collection?(ret) r = if ret.is_a?(Hash) heap == 'keys' ? ret.keys : ret.values else heap == 'keys' ? (0..ret.length - 1).to_a : ret end wrap_reply('ret' => r) end