Class: OneLogin::RubySaml::AttributeService

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/ruby-saml/attribute_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAttributeService

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

#attributesObject (readonly)

Returns the value of attribute attributes.



4
5
6
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 4

def attributes
  @attributes
end

#indexObject (readonly)

Returns the value of attribute index.



6
7
8
# File 'lib/onelogin/ruby-saml/attribute_service.rb', line 6

def index
  @index
end

#nameObject (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(options={})
  attributes << options 
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

Returns:

  • (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