Sha256: 1c0b023fb37a16a3a3dc3ef1fe2fb9dae3f0255e87bce608105f9797f57b02a3

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

module Jei
  module Nodes
    # @see http://jsonapi.org/format/#document-top-level
    class CollectionDataNode < DataNode
      # @param [Hash<Symbol, Object>] context
      def visit(context)
        context[:data] = children.map do |child|
          data = {}
          child.visit(data)
          data
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jei-0.2.0 lib/jei/nodes/collection_data_node.rb