Class: Compositor::Renderer::Merged
- Defined in:
- lib/compositor/renderer/merged.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Compositor::Renderer::Base
Instance Method Details
#render ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/compositor/renderer/merged.rb', line 4 def render return {} if collection.nil? or collection.size == 0 return collection.first.to_hash if collection.length == 1 result = {} collection.each do |hash| result.merge!(hash.to_hash) end result end |