class Shibkit::MetaMeta::Organisation
Class to represent the metadata of the organisation owning a Shibboleth entity
Constants
- REQUIRED_QUACKS
- ROOT_ELEMENT
Element and attribute used to select XML for new objects
- TARGET_ATTR
Attributes
display_name[RW]
The human-readable display name for the organisation
name[RW]
The name identifier for the organisation
url[RW]
The homepage URL for the organisation
Public Instance Methods
druid()
click to toggle source
Try to make a crude unique id for the organisation
# File lib/shibkit/meta_meta/organisation.rb, line 41 def druid ## Derived, *relatively* unique ID. return display_name.strip.downcase.delete " .,-_'" end
to_s()
click to toggle source
# File lib/shibkit/meta_meta/organisation.rb, line 48 def to_s return display_name end
Private Instance Methods
parse_xml()
click to toggle source
# File lib/shibkit/meta_meta/organisation.rb, line 56 def parse_xml @name = @noko.xpath('xmlns:OrganizationName[1]')[0].content.strip @display_name = @noko.xpath('xmlns:OrganizationDisplayName[1]')[0].content.strip @url = @noko.xpath('xmlns:OrganizationURL[1]')[0].content.strip log.debug " Derived organisation #{url} from XML" end