Module: Parliament::Utils::Helpers::VCardHelper

Defined in:
lib/parliament/utils/helpers/v_card_helper.rb

Instance Method Summary collapse

Instance Method Details

#create_vcard(contact_point) ⇒ Vcard::Vcard

Generates a vcard for the given contact point.

Parameters:

Returns:

  • (Vcard::Vcard)

    a vcard with person, postal address and contact details set.



12
13
14
15
16
17
18
19
20
# File 'lib/parliament/utils/helpers/v_card_helper.rb', line 12

def create_vcard(contact_point)
  Vcard::Vcard::Maker.make2 do |maker|
    maker.add_name do |name|
      contacts_set(contact_point, maker)
      postal_address_set(contact_point, maker)
      person_set(contact_point, name)
    end
  end
end