Class: SAML::Metadata::EntitiesDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/saml/metadata/entities_descriptor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#entity_descriptorsObject (readonly)

Returns the value of attribute entity_descriptors.



5
6
7
# File 'lib/saml/metadata/entities_descriptor.rb', line 5

def entity_descriptors
  @entity_descriptors
end

Class Method Details

.from_xml(xml) ⇒ Object



7
8
9
# File 'lib/saml/metadata/entities_descriptor.rb', line 7

def self.from_xml(xml)
  allocate.from_xml(xml)
end

Instance Method Details

#from_xml(xml) ⇒ Object



11
12
13
14
15
16
# File 'lib/saml/metadata/entities_descriptor.rb', line 11

def from_xml(xml)
  @entity_descriptors = xml.get_elements('md:EntityDescriptor').map do |ed_node|
    EntityDescriptor.from_xml(ed_node)
  end
  self
end

#idpObject



24
25
26
27
28
# File 'lib/saml/metadata/entities_descriptor.rb', line 24

def idp
  @entity_descriptors.each do |entity|
    return entity if entity.idp?
  end
end

#spObject



18
19
20
21
22
# File 'lib/saml/metadata/entities_descriptor.rb', line 18

def sp
  @entity_descriptors.each do |entity|
    return entity if entity.sp?
  end
end