Class: OneLogin::RubySaml::AttributeService
- Inherits:
-
Object
- Object
- OneLogin::RubySaml::AttributeService
- Defined in:
- lib/onelogin/ruby-saml/attribute_service.rb
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
- #configure(&block) ⇒ Object
- #configured? ⇒ Boolean
-
#initialize ⇒ AttributeService
constructor
A new instance of AttributeService.
- #service_index(index) ⇒ Object
- #service_name(name) ⇒ Object
Constructor Details
#initialize ⇒ AttributeService
Returns a new instance of AttributeService.
8 9 10 11 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 8 def initialize @index = "1" @attributes = [] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 4 def attributes @attributes end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
6 7 8 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 6 def index @index end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 5 def name @name end |
Instance Method Details
#add_attribute(options = {}) ⇒ Object
29 30 31 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 29 def add_attribute(={}) attributes << end |
#configure(&block) ⇒ Object
13 14 15 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 13 def configure(&block) instance_eval &block end |
#configured? ⇒ Boolean
17 18 19 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 17 def configured? @attributes.length > 0 && !@name.nil? end |
#service_index(index) ⇒ Object
25 26 27 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 25 def service_index(index) @index = index end |
#service_name(name) ⇒ Object
21 22 23 |
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 21 def service_name(name) @name = name end |