Sha256: 3983d4811adaedc7b49a700620208d219d63372fef87341b1d27f249526e06ec

Contents?: true

Size: 821 Bytes

Versions: 3

Compression:

Stored size: 821 Bytes

Contents

# => http://microformats.org/wiki/hcard
require 'microformat'

class HCard < Microformat
  container :vcard

  one :fn, :bday, :tz, :sort_string, :uid, :class
  many :label, :sound, :title, :role, :key, 
       :mailer, :rev, :nickname, :category, :note,
       :logo => :url, :url => :url, :photo => :url

  one :n do
    one :family_name, :given_name, :additional_name
    many :honorific_prefix, :honorific_suffix
  end 

  many :email do 
    many :type
    many :value
  end 

  many :tel do
    many :type
    many :value
  end

  many :adr do
    one :post_office_box, :extended_address, :street_address,
        :locality, :region, :postal_code, :country_name, :value
    many :type
  end

  one :geo do
    one :latitude, :longitude
  end

  many :org do
    one :organization_name, :organization_unit
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mofo-0.1.2 lib/mofo/hcard.rb
mofo-0.1 lib/mofo/hcard.rb
mofo-0.1.1 lib/mofo/hcard.rb