View Source SmeeView.Aspects.Contact (SmeeView v0.2.1)
Represents and processes <ContactPerson> elements in entity metadata as Aspect structs.
The functions in this module are intended to be applied to individual Aspect structs - for extracting and processing collections of these records please use the matching View module.
Summary
Functions
Returns the company name, if present (it probably isn't!)
Returns the suggested display name of a contact, derived from given name, surname and company.
Returns the email address as a bare email address (without name, not a URL)
Returns the contact's email address as a URL (as it's stored in the metadata, probably)
Returns the contact's givenname, if present
Is this aspect relevant to the IdP role?
Returns the email address and name in RFC5322 name-addr format (name address@domain)
Returns the phone number of the contact, if present.
Returns the phone number of the contact (or nil) as a URL, as it probably isn't stored in the metadata
Returns the associated role for this aspect: :sp, :idp or :all
Is this aspect relevant to the SP role?
Returns the surname of the contact, if present.
Returns the contact type (technical, support, administrative, billing, or other)
Types
Functions
Returns the company name, if present (it probably isn't!)
Contact.company(aspect)
# => "Unseen University"
Returns the suggested display name of a contact, derived from given name, surname and company.
Contact.displayname(contact)
# => "Ponder Stibbons (Unseen University)"
Returns the email address as a bare email address (without name, not a URL)
Contact.email(contact)
# => "ponders@unseen.edu"
Returns the contact's email address as a URL (as it's stored in the metadata, probably)
Contact.email_url(contact)
# => "mailto:ponders@unseen.edu"
Returns the contact's givenname, if present
Contact.givenname(contact)
# => "Ponder"
Is this aspect relevant to the IdP role?
Will return true
if the aspect has been derived from an IdP role, or is applicable to all roles.
Contact.idp?(aspect)
# => true
Returns the email address and name in RFC5322 name-addr format (name address@domain)
Contact.name_addr(contact)
# => "Ponder Stibbons <ponders@unseen.edu>"
Returns the phone number of the contact, if present.
Contact.phone(contact)
# => "01632960808"
Returns the phone number of the contact (or nil) as a URL, as it probably isn't stored in the metadata
Contact.phone_url(contact)
# => "tel:01632960808"
Returns the associated role for this aspect: :sp, :idp or :all
The role type is useful when handling a mixed list of aspects that may be specific to certain roles of an entity.
Contact.role(aspect)
# => :idp
Is this aspect relevant to the SP role?
Will return true
if the aspect has been derived from an SP role, or is applicable to all roles.
Contact.sp?(aspect)
# => false
Returns the surname of the contact, if present.
Contact.surname(contact)
# => "Stibbons"
Returns the contact type (technical, support, administrative, billing, or other)
Contact.type(contact)
# => "administrative"