Class: Saml::Kit::Bindings::Binding
- Inherits:
-
Object
- Object
- Saml::Kit::Bindings::Binding
- Defined in:
- lib/saml/kit/bindings/binding.rb
Overview
This class is a base class for SAML bindings.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#binding ⇒ Object
readonly
Returns the value of attribute binding.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #binding?(other) ⇒ Boolean
- #deserialize(_params) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(binding:, location:) ⇒ Binding
constructor
A new instance of Binding.
- #inspect ⇒ Object
- #serialize ⇒ Object
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(binding:, location:) ⇒ Binding
Returns a new instance of Binding.
11 12 13 14 |
# File 'lib/saml/kit/bindings/binding.rb', line 11 def initialize(binding:, location:) @binding = binding @location = location end |
Instance Attribute Details
#binding ⇒ Object (readonly)
Returns the value of attribute binding.
9 10 11 |
# File 'lib/saml/kit/bindings/binding.rb', line 9 def binding @binding end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
9 10 11 |
# File 'lib/saml/kit/bindings/binding.rb', line 9 def location @location end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 |
# File 'lib/saml/kit/bindings/binding.rb', line 32 def ==(other) to_s == other.to_s end |
#binding?(other) ⇒ Boolean
16 17 18 |
# File 'lib/saml/kit/bindings/binding.rb', line 16 def binding?(other) binding == other end |
#deserialize(_params) ⇒ Object
24 25 26 |
# File 'lib/saml/kit/bindings/binding.rb', line 24 def deserialize(_params) raise ArgumentError, 'Unsupported binding' end |
#eql?(other) ⇒ Boolean
36 37 38 |
# File 'lib/saml/kit/bindings/binding.rb', line 36 def eql?(other) self == other end |
#hash ⇒ Object
40 41 42 |
# File 'lib/saml/kit/bindings/binding.rb', line 40 def hash to_s.hash end |
#inspect ⇒ Object
48 49 50 |
# File 'lib/saml/kit/bindings/binding.rb', line 48 def inspect to_h.inspect end |
#serialize ⇒ Object
20 21 22 |
# File 'lib/saml/kit/bindings/binding.rb', line 20 def serialize(*) [] end |
#to_h ⇒ Object
28 29 30 |
# File 'lib/saml/kit/bindings/binding.rb', line 28 def to_h { binding: binding, location: location } end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/saml/kit/bindings/binding.rb', line 44 def to_s "#{location}#{binding}" end |