Module: SAML2::IndexedObject
- Included in:
- AttributeConsumingService, Endpoint::Indexed
- Defined in:
- lib/saml2/indexed_object.rb
Defined Under Namespace
Classes: Array
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #build(builder)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Serialize this object to XML, as part of a larger document. 
- #default? ⇒ Boolean
- #default_defined? ⇒ Boolean
- #eql?(other) ⇒ Boolean
- 
  
    
      #from_xml(node)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    Parse an XML element into this object. 
- #initialize ⇒ Object
Instance Attribute Details
#index ⇒ Integer
| 8 9 10 | # File 'lib/saml2/indexed_object.rb', line 8 def index @index end | 
Class Method Details
.included(klass) ⇒ Object
| 91 92 93 | # File 'lib/saml2/indexed_object.rb', line 91 def self.included(klass) klass.const_set(:Array, Array.dup) end | 
Instance Method Details
#build(builder) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
| 85 86 87 88 89 | # File 'lib/saml2/indexed_object.rb', line 85 def build(builder, *) super builder.parent.children.last["index"] = index builder.parent.children.last["isDefault"] = default? if default_defined? end | 
#default? ⇒ Boolean
| 21 22 23 | # File 'lib/saml2/indexed_object.rb', line 21 def default? !!@is_default end | 
#default_defined? ⇒ Boolean
| 25 26 27 | # File 'lib/saml2/indexed_object.rb', line 25 def default_defined? !@is_default.nil? end | 
#eql?(other) ⇒ Boolean
| 15 16 17 18 19 | # File 'lib/saml2/indexed_object.rb', line 15 def eql?(other) index == other.index && default? == other.default? && super end | 
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
| 30 31 32 33 34 | # File 'lib/saml2/indexed_object.rb', line 30 def from_xml(node) @index = node["index"]&.to_i @is_default = node["isDefault"] && node["isDefault"] == "true" super end | 
#initialize ⇒ Object
| 10 11 12 13 | # File 'lib/saml2/indexed_object.rb', line 10 def initialize(*) @is_default = nil super end |