X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=lib%2Fmcollective%2Fdata%2Fresult.rb;fp=lib%2Fmcollective%2Fdata%2Fresult.rb;h=8ffe4d2f34861d8ddd9f347cf63f628f13f5bb81;hb=8fd0f35facc21b89b378ecfb253e06a66af1e422;hp=e19a652ffa8b10a6c21dacf1735b62acae39ee0f;hpb=327162e6e319ff38447992668e0753363b870b6e;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/data/result.rb b/lib/mcollective/data/result.rb index e19a652..8ffe4d2 100644 --- a/lib/mcollective/data/result.rb +++ b/lib/mcollective/data/result.rb @@ -6,8 +6,12 @@ module MCollective # method_missing lookup strategy undef :type if method_defined?(:type) - def initialize + def initialize(outputs) @data = {} + + outputs.keys.each do |output| + @data[output] = outputs[output].fetch(:default, nil) + end end def include?(key)