Class: SAML2::RequestedAttribute
- Defined in:
- lib/saml2/attribute_consuming_service.rb
Instance Attribute Summary
Attributes inherited from Attribute
#friendly_name, #name, #name_format, #value
Instance Method Summary collapse
- #from_xml(node) ⇒ Object
-
#initialize(name = nil, is_required = nil, name_format = nil) ⇒ RequestedAttribute
constructor
A new instance of RequestedAttribute.
- #required? ⇒ Boolean
Methods inherited from Attribute
#build, create, from_xml, inherited, subclasses
Methods inherited from Base
from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize(name = nil, is_required = nil, name_format = nil) ⇒ RequestedAttribute
Returns a new instance of RequestedAttribute.
9 10 11 12 |
# File 'lib/saml2/attribute_consuming_service.rb', line 9 def initialize(name = nil, is_required = nil, name_format = nil) super(name, nil, nil, name_format) @is_required = is_required end |
Instance Method Details
#from_xml(node) ⇒ Object
14 15 16 17 |
# File 'lib/saml2/attribute_consuming_service.rb', line 14 def from_xml(node) super @is_required = node['isRequired'] && node['isRequired'] == 'true' end |
#required? ⇒ Boolean
19 20 21 |
# File 'lib/saml2/attribute_consuming_service.rb', line 19 def required? @is_required end |