Class: JSONP3::Count

Inherits:
FunctionExtension show all
Defined in:
lib/json_p3/function_extensions/count.rb

Overview

The standard count function.

Constant Summary collapse

ARG_TYPES =
[:nodes_expression].freeze
RETURN_TYPE =
:value_expression

Instance Method Summary collapse

Instance Method Details

#call(node_list) ⇒ Object



11
12
13
# File 'lib/json_p3/function_extensions/count.rb', line 11

def call(node_list)
  node_list.length
end