Sha256: 8272d363fd4fc12ebef6ab0402f243855c42fa237e65b369b4154ac1121191ac
Contents?: true
Size: 553 Bytes
Versions: 5
Compression:
Stored size: 553 Bytes
Contents
require_relative './enum' module Dentaku module AST class Any < Enum def value(context = {}) collection = Array(@args[0].value(context)) item_identifier = @args[1].identifier expression = @args[2] collection.any? do |item_value| expression.value( context.merge( FlatHash.from_hash_with_intermediates(item_identifier => item_value) ) ) end end end end end Dentaku::AST::Function.register_class(:any, Dentaku::AST::Any)
Version data entries
5 entries across 5 versions & 2 rubygems