Module: SAML2::IndexedObject
- Included in:
- AttributeConsumingService, Endpoint::Indexed
- Defined in:
- lib/saml2/indexed_object.rb
Defined Under Namespace
Classes: Array
Instance Attribute 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?(rhs) ⇒ 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 |
Instance Method Details
#build(builder) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
80 81 82 83 84 |
# File 'lib/saml2/indexed_object.rb', line 80 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?(rhs) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/saml2/indexed_object.rb', line 15 def eql?(rhs) index == rhs.index && default? == rhs.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'] && 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 |