Sha256: 740fad94d03d94b65fdfaceec797faac591a0eb865bf03df50de35d1e1e5f794
Contents?: true
Size: 935 Bytes
Versions: 4
Compression:
Stored size: 935 Bytes
Contents
=begin rdoc Cloud extensions for the DependencyResolver =end module PoolParty # Take the cloud dependency tree module DependencyResolverCloudExtensions def to_properties_hash oh = OrderedHash.new oh[:options] = options.merge(:cloud_name => name) oh[:resources] = ordered_resources.map {|a| a.to_properties_hash } # oh[:resources] = resources.keys.inject(OrderedHash.new) do |sum,k| # sum.merge(k.to_sym => resources[k].map {|a| a.to_properties_hash } ) # end oh[:services] = services.keys.inject(OrderedHash.new) do |sum,k| sum.merge(k.to_sym => services[k].map {|a| a.to_properties_hash } ) end oh end end # Adds the to_properties_hash method on top of resources, the lowest level module DependencyResolverResourceExtensions def to_properties_hash {:pp_type => self.class.to_s.top_level_class}.merge!(options) end end end
Version data entries
4 entries across 4 versions & 2 rubygems