class Flor::Pro::Length

Public Instance Methods

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

  @node['ret'] = receive_payload_ret

  unatt_unkeyed_children
end
receive_last() click to toggle source
# File lib/flor/pcore/length.rb, line 37
def receive_last

  r =
    @node['ret'] ||
    fail(Flor::FlorError.new('found no argument that has a length', self))

  wrap_reply('ret' => r)
end
receive_payload_ret() click to toggle source
# File lib/flor/pcore/length.rb, line 31
def receive_payload_ret

  r = payload['ret']
  r.respond_to?(:length) ? r.length : false
end