Class: Saml::Elements::Subject
- Inherits:
-
Object
- Object
- Saml::Elements::Subject
- Includes:
- Base
- Defined in:
- lib/saml/elements/subject.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Subject
constructor
A new instance of Subject.
- #name_id ⇒ Object
- #name_id=(value) ⇒ Object
- #name_id_format ⇒ Object
- #subject_confirmation ⇒ Object
- #subject_confirmation=(subject_confirmation) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Subject
Returns a new instance of Subject.
18 19 20 21 22 23 24 25 |
# File 'lib/saml/elements/subject.rb', line 18 def initialize(*args) = args. @_name_id = Saml::Elements::NameId.new(format: .delete(:name_id_format), value: .delete(:name_id)) @subject_confirmations = [Saml::Elements::SubjectConfirmation.new(recipient: .delete(:recipient), in_response_to: .delete(:in_response_to))] super(*(args << )) end |
Instance Method Details
#name_id ⇒ Object
27 28 29 |
# File 'lib/saml/elements/subject.rb', line 27 def name_id @_name_id.value end |
#name_id=(value) ⇒ Object
31 32 33 |
# File 'lib/saml/elements/subject.rb', line 31 def name_id=(value) @_name_id.value = value end |
#name_id_format ⇒ Object
35 36 37 |
# File 'lib/saml/elements/subject.rb', line 35 def name_id_format @_name_id.format end |
#subject_confirmation ⇒ Object
39 40 41 |
# File 'lib/saml/elements/subject.rb', line 39 def subject_confirmation subject_confirmations.first end |
#subject_confirmation=(subject_confirmation) ⇒ Object
43 44 45 |
# File 'lib/saml/elements/subject.rb', line 43 def subject_confirmation=(subject_confirmation) self.subject_confirmations = [subject_confirmation] end |