Module: SAML2::IndexedObject
- Included in:
- AttributeConsumingService, Endpoint::Indexed
- Defined in:
- lib/saml2/indexed_object.rb
Defined Under Namespace
Classes: Array
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
- #build(builder) ⇒ Object
- #default? ⇒ Boolean
- #eql?(rhs) ⇒ Boolean
- #from_xml(node) ⇒ Object
- #initialize(*args) ⇒ Object
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
5 6 7 |
# File 'lib/saml2/indexed_object.rb', line 5 def index @index end |
Instance Method Details
#build(builder) ⇒ Object
53 54 55 56 57 |
# File 'lib/saml2/indexed_object.rb', line 53 def build(builder) super builder.parent.last['index'] = index builder.parent.last['isDefault'] = default? unless default?.nil? end |
#default? ⇒ Boolean
18 19 20 |
# File 'lib/saml2/indexed_object.rb', line 18 def default? !!@is_default end |
#eql?(rhs) ⇒ Boolean
12 13 14 15 16 |
# File 'lib/saml2/indexed_object.rb', line 12 def eql?(rhs) index == rhs.index && default? == rhs.default? && super end |
#from_xml(node) ⇒ Object
22 23 24 25 26 |
# File 'lib/saml2/indexed_object.rb', line 22 def from_xml(node) @index = node['index'] && node['index'].to_i @is_default = node['isDefault'] && node['isDefault'] == 'true' super end |
#initialize(*args) ⇒ Object
7 8 9 10 |
# File 'lib/saml2/indexed_object.rb', line 7 def initialize(*args) @is_default = nil super end |