Class: Saml::ComplexTypes::StatementAbstractType
- Inherits:
-
Object
- Object
- Saml::ComplexTypes::StatementAbstractType
- Includes:
- HappyMapper
- Defined in:
- lib/saml/complex_types/statement_abstract_type.rb
Class Method Summary collapse
-
.parse(xml, options = {}) ⇒ Object
TODO: handle multiple statements with different types.
- .register_type(type, klass) ⇒ Object
- .types ⇒ Object
Class Method Details
.parse(xml, options = {}) ⇒ Object
TODO: handle multiple statements with different types
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/saml/complex_types/statement_abstract_type.rb', line 22 def self.parse(xml, = {}) statements = Array(super) statements.collect do |statement| if (type = types[statement.type]) type.parse(xml, .merge(single: true)) else statement end end end |
.register_type(type, klass) ⇒ Object
13 14 15 |
# File 'lib/saml/complex_types/statement_abstract_type.rb', line 13 def self.register_type(type, klass) types[type] = klass end |
.types ⇒ Object
17 18 19 |
# File 'lib/saml/complex_types/statement_abstract_type.rb', line 17 def self.types @types ||= {} end |