Module: SAML2::Endpoint::ChoiceHelpers
- Included in:
- Array, Indexed::Array
- 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
11 12 13 |
# File 'lib/saml2/endpoint.rb', line 11 def choose_binding(*bindings) (bindings & map(&:binding)).first end |
#choose_endpoint(binding) ⇒ Endpoint?
Choose an endpoint from this list of endpoints that supports a given binding
19 20 21 |
# File 'lib/saml2/endpoint.rb', line 19 def choose_endpoint(binding) find { |endpoint| endpoint.binding == binding } end |