Method: Dentaku::AST::Pluck#value
- Defined in:
- lib/dentaku/ast/functions/pluck.rb
#value(context = {}) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/dentaku/ast/functions/pluck.rb', line 19 def value(context = {}) collection = @args[0].value(context) pluck_path = @args[1].identifier collection.map { |h| h.transform_keys(&:to_s)[pluck_path] } end |