Class: SAML2::Endpoint

Inherits:
Base
  • Object
show all
Defined in:
lib/saml2/endpoint.rb

Direct Known Subclasses

Indexed

Defined Under Namespace

Modules: Bindings Classes: Indexed

Instance Attribute Summary collapse

Attributes inherited from Base

#xml

Instance Method Summary collapse

Methods inherited from Base

from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml

Constructor Details

#initialize(location = nil, binding = ::SAML2::Bindings::HTTP_POST::URN) ⇒ Endpoint

Returns a new instance of Endpoint.



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

def initialize(location = nil, binding = ::SAML2::Bindings::HTTP_POST::URN)
  @location, @binding = location, binding
end

Instance Attribute Details

#bindingObject (readonly)

Returns the value of attribute binding.



11
12
13
# File 'lib/saml2/endpoint.rb', line 11

def binding
  @binding
end

#locationObject (readonly)

Returns the value of attribute location.



11
12
13
# File 'lib/saml2/endpoint.rb', line 11

def location
  @location
end

Instance Method Details

#==(rhs) ⇒ Object



17
18
19
# File 'lib/saml2/endpoint.rb', line 17

def ==(rhs)
  location == rhs.location && binding == rhs.binding
end

#build(builder, element) ⇒ Object



27
28
29
# File 'lib/saml2/endpoint.rb', line 27

def build(builder, element)
  builder['md'].__send__(element, 'Location' => location, 'Binding' => binding)
end

#from_xml(node) ⇒ Object



21
22
23
24
25
# File 'lib/saml2/endpoint.rb', line 21

def from_xml(node)
  super
  @location = node['Location']
  @binding = node['Binding']
end