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

Instance Attribute Details

#indexObject (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



48
49
50
51
52
# File 'lib/saml2/indexed_object.rb', line 48

def build(builder)
  super
  builder.parent.last['index'] = index
  builder.parent.last['isDefault'] = default? unless default?.nil?
end

#default?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/saml2/indexed_object.rb', line 13

def default?
  @is_default
end

#eql?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/saml2/indexed_object.rb', line 7

def eql?(rhs)
  index == rhs.index &&
      default? == rhs.default? &&
      super
end

#from_xml(node) ⇒ Object



17
18
19
20
21
# File 'lib/saml2/indexed_object.rb', line 17

def from_xml(node)
  @index = node['index'] && node['index'].to_i
  @is_default = node['isDefault'] && node['isDefault'] == 'true'
  super
end