# File lib/puppet/resource.rb, line 42 42: def to_pson_data_hash 43: data = ([:type, :title, :tags] + ATTRIBUTES).inject({}) do |hash, param| 44: next hash unless value = self.send(param) 45: hash[param.to_s] = value 46: hash 47: end 48: 49: data["exported"] ||= false 50: 51: params = self.to_hash.inject({}) do |hash, ary| 52: param, value = ary 53: 54: # Don't duplicate the title as the namevar 55: next hash if param == namevar and value == title 56: hash[param] = value 57: hash 58: end 59: 60: data["parameters"] = params unless params.empty? 61: 62: data 63: end