Sha256: e86df26c045487bf4ab05d5229212f429c6fe2620f5cf785d54b5475a8d39cc4
Contents?: true
Size: 820 Bytes
Versions: 9
Compression:
Stored size: 820 Bytes
Contents
require 'saml2/contact' require 'saml2/organization' module SAML2 module OrganizationAndContacts attr_writer :organization, :contacts def initialize @organization = nil @contacts = [] end def from_xml(node) remove_instance_variable(:@organization) @contacts = nil super end def organization unless instance_variable_defined?(:@organization) @organization = Organization.from_xml(xml.at_xpath('md:Organization', Namespaces::ALL)) end @organization end def contacts @contacts ||= load_object_array(xml, 'md:ContactPerson', Contact) end protected def build(builder) organization.build(builder) if organization contacts.each do |contact| contact.build(builder) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems