lib/mapi/property_set.rb
# this is the function that creates a symbol to key mapping. currently this works by making a
# pass through the raw properties, but conceivably you could map symbols to keys using the
# mapitags directly. problem with that would be that named properties wouldn't map automatically,
# but maybe thats not too important.
this is the function that creates a symbol to key mapping. currently this works by making a
pass through the raw properties, but conceivably you could map symbols to keys using the
mapitags directly. problem with that would be that named properties wouldn't map automatically,
but maybe thats not too important.
this is the function that creates a symbol to key mapping . currently this works by making a pass through the raw properties but conceivably you could map symbols to keys using the mapitags directly . problem with that would be that named properties wouldn ' t map automatically but maybe thats not too important .
def sym_to_key
			return @sym_to_key if @sym_to_key
			@sym_to_key = {}
			raw.keys.each do |key|
				sym = key.to_sym
				unless Symbol === sym
					Log.debug "couldn't find symbolic name for key #{key.inspect}" 
					next
				end
				if @sym_to_key[sym]
					Log.warn "duplicate key #{key.inspect}"
					@sym_to_key[sym] = key if key.guid == PS_MAPI
				else
					@sym_to_key[sym] = key
				end
			end
			@sym_to_key
		end
def sym_to_key return @sym_to_key if @sym_to_key @sym_to_key = { } raw . keys . each do | key | sym = key . to_sym unless Symbol === sym Log . debug "couldn't find symbolic name for key #{key.inspect}" next end if @sym_to_key [ sym ] Log . warn "duplicate key #{key.inspect}" @sym_to_key [ sym ] = key if key . guid == PS_MAPI else @sym_to_key [ sym ] = key end end @sym_to_key end
this is the function that creates a symbol to key mapping.
this is the function that creates a symbol to key mapping .
# we give preference to PS_MAPI keys # just assign