Module: Saml2::Assertion::Parsing
- Included in:
- Saml2::Assertion
- Defined in:
- lib/saml2/assertion.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.item(name, xpath) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/saml2/assertion.rb', line 10 def self.item(name, xpath) module_eval(<<-ITEM_METH) def #{name}_from(node) target_node = node.at('#{xpath}') raise InvalidAssertionError, "#{name} missing (xpath: `#{xpath}`)" unless target_node target_node.content.strip end ITEM_METH end |
Instance Method Details
#each_attribute_node_from(doc, &blk) ⇒ Object
26 27 28 29 30 |
# File 'lib/saml2/assertion.rb', line 26 def each_attribute_node_from(doc, &blk) attribute_nodes = doc.search('//asrt:Assertion/asrt:AttributeStatement/asrt:Attribute') attribute_nodes.each &blk end |