# File lib/vpim/vcard.rb, line 1244 def add_impp(url) # :yield: impp params = {} if block_given? x = Struct.new( :location, :preferred, :purpose ).new yield x x[:preferred] = 'PREF' if x[:preferred] types = x.to_a.flatten.compact.map { |s| s.downcase }.uniq params['TYPE'] = types if types.first end @card << Vpim::DirectoryInfo::Field.create( 'IMPP', url, params) self end