class Flor::Pro::ArrayQmark

Public Instance Methods

pre_execute() click to toggle source
# File lib/flor/pcore/array_qmark.rb, line 66
def pre_execute

  @node['ret'] = receive_payload_ret

  unatt_unkeyed_children
end
receive_last() click to toggle source
# 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() click to toggle source
# File lib/flor/pcore/array_qmark.rb, line 99
def receive_payload_ret; payload['ret']; end