class Shibkit::MetaMeta::Attribute

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

friendly_name[RW]
is_required[RW]
is_required?[RW]
name[RW]
name_format[RW]
required?[RW]
values[RW]

Private Instance Methods

parse_xml() click to toggle source
# File lib/shibkit/meta_meta/attribute.rb, line 54
 def parse_xml
  
  @name = @noko['Name']
  
  @is_required = @noko['isRequired'].to_s.downcase == 'true' ? true : false
  
  @name_format = @noko['NameFormat']
  
  @friendly_name = @noko['FriendlyName']
  
  @values ||= Array.new
  @noko.xpath('saml:AttributeValue').each { |ax| @values << ax.content.strip }
  
  log.debug "    Derived attribute #{name} from XML"
  
end
to_s() click to toggle source

Nicer presentation as a string

# File lib/shibkit/meta_meta/attribute.rb, line 48
def to_s
  
  return friendly_name
 
end