Class: SAML2::Endpoint::Indexed::Array
- Inherits:
-
Object
- Object
- SAML2::Endpoint::Indexed::Array
- Includes:
- ChoiceHelpers
- Defined in:
- lib/saml2/endpoint.rb
Instance Method Summary collapse
-
#choose_binding(*bindings) ⇒ String
Choose a binding supported by this list of endpoints.
-
#choose_endpoint(binding) ⇒ Endpoint?
Choose an endpoint from this list of endpoints that supports a given binding.
Instance Method Details
#choose_binding(*bindings) ⇒ String
Choose a binding supported by this list of endpoints
Note that if there is a default endpoint, its binding will be preferred even over the order of the bindings passed in (as long as it is included in the list at all).
46 47 48 49 50 |
# File 'lib/saml2/endpoint.rb', line 46 def choose_binding(*bindings) return default.binding if default && bindings.include?(default.binding) super end |
#choose_endpoint(binding) ⇒ Endpoint?
Choose an endpoint from this list of endpoints that supports a given binding
Note that if there is a default endpoint, it will be returned if its binding matches even over earlier endpoints in the list.
58 59 60 61 62 |
# File 'lib/saml2/endpoint.rb', line 58 def choose_endpoint(binding) return default if default && default.binding == binding super end |