Class: OneLogin::RubySaml::AttributeService
- Inherits:
-
Object
- Object
- OneLogin::RubySaml::AttributeService
- Defined in:
- lib/onelogin/ruby-saml/attribute_service.rb
Overview
SAML2 AttributeService. Auxiliary class to build the AttributeService of the SP Metadata
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#add_attribute(options = {}) ⇒ Object
Add an AttributeService.
- #configure(&block) ⇒ Object
-
#configured? ⇒ Boolean
True if the AttributeService object has been initialized and set with the required values (has attributes and a name).
-
#initialize ⇒ AttributeService
constructor
Initializes the AttributeService, set the index value as 1 and an empty array as attributes.
-
#service_index(index) ⇒ Object
Set an index to the service.
-
#service_name(name) ⇒ Object
Set a name to the service.
Constructor Details
#initialize ⇒ AttributeService
Initializes the AttributeService, set the index value as 1 and an empty array as attributes
13 14 15 16 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 13 def initialize @index = "1" @attributes = [] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 7 def attributes @attributes end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
9 10 11 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 9 def index @index end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 8 def name @name end |
Instance Method Details
#add_attribute(options = {}) ⇒ Object
Add an AttributeService
52 53 54 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 52 def add_attribute(={}) attributes << end |
#configure(&block) ⇒ Object
18 19 20 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 18 def configure(&block) instance_eval(&block) end |
#configured? ⇒ Boolean
Returns True if the AttributeService object has been initialized and set with the required values (has attributes and a name).
24 25 26 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 24 def configured? @attributes.length > 0 && !@name.nil? end |
#service_index(index) ⇒ Object
Set an index to the service
38 39 40 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 38 def service_index(index) @index = index end |
#service_name(name) ⇒ Object
Set a name to the service
31 32 33 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 31 def service_name(name) @name = name end |