Class: Dentaku::AST::All
- Defined in:
- lib/dentaku/ast/functions/all.rb
Constant Summary
Constants inherited from Function
Instance Attribute Summary
Attributes inherited from Function
Instance Method Summary collapse
Methods inherited from Enum
#dependencies, #initialize, max_param_count, min_param_count, #validate_identifier
Methods inherited from Function
#accept, #dependencies, get, #initialize, numeric, register, register_class, registry
Methods inherited from Node
arity, #dependencies, #name, precedence, resolve_class, #type
Constructor Details
This class inherits a constructor from Dentaku::AST::Enum
Instance Method Details
#value(context = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/dentaku/ast/functions/all.rb', line 6 def value(context = {}) collection = Array(@args[0].value(context)) item_identifier = @args[1].identifier expression = @args[2] collection.all? do |item_value| mapped_value(expression, context, item_identifier => item_value) end end |