Sha256: da34fde736e42fc789c567e83b1e880437a8532cc547091dfbd5ae73117fa409

Contents?: true

Size: 330 Bytes

Versions: 3

Compression:

Stored size: 330 Bytes

Contents

module Compositor
  module Renderer
    class Merged < Base
      def render
        return {} if collection.nil? or collection.size == 0
        return collection.first.to_hash if collection.length == 1
        collection.inject({}) do |result, hash|
          result.merge!(hash.to_hash)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
compositor-0.1.4 lib/compositor/renderer/merged.rb
compositor-0.1.3 lib/compositor/renderer/merged.rb
compositor-0.1.1 lib/compositor/renderer/merged.rb