Class: Saml::Kit::Bindings::Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/saml/kit/bindings/binding.rb

Direct Known Subclasses

HttpPost, HttpRedirect

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binding:, location:) ⇒ Binding

Returns a new instance of Binding.



7
8
9
10
# File 'lib/saml/kit/bindings/binding.rb', line 7

def initialize(binding:, location:)
  @binding = binding
  @location = location
end

Instance Attribute Details

#binding ⇒ Object (readonly)

Returns the value of attribute binding.



5
6
7
# File 'lib/saml/kit/bindings/binding.rb', line 5

def binding
  @binding
end

#location ⇒ Object (readonly)

Returns the value of attribute location.



5
6
7
# File 'lib/saml/kit/bindings/binding.rb', line 5

def location
  @location
end

Instance Method Details

#binding?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/saml/kit/bindings/binding.rb', line 12

def binding?(other)
  binding == other
end

#deserialize(params) ⇒ Object

Raises:

  • (ArgumentError)


20
21
22
# File 'lib/saml/kit/bindings/binding.rb', line 20

def deserialize(params)
  raise ArgumentError.new("Unsupported binding")
end

#serialize(builder, relay_state: nil) ⇒ Object



16
17
18
# File 'lib/saml/kit/bindings/binding.rb', line 16

def serialize(builder, relay_state: nil)
  []
end

#to_h ⇒ Object



24
25
26
# File 'lib/saml/kit/bindings/binding.rb', line 24

def to_h
  { binding: binding, location: location }
end