Sha256: 00e78266aee82dd88f207fb5152645287111fd65c797d312041e864b4c61687e

Contents?: true

Size: 403 Bytes

Versions: 1

Compression:

Stored size: 403 Bytes

Contents

module Supa
  module Commands
    class Collection < Supa::Command
      include Supa::Commands::Collectionable

      def represent
        @tree[@name] = [] unless @options[:squash]

        collection.each do |element|
          @tree[@name] << {}

          Supa::Builder.new(element, tree: @tree[@name][-1], representer: @representer).instance_exec(&@block)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
supa-0.2.0 lib/supa/commands/collection.rb