Class: SamlIdp::AttributeDecorator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/saml_idp/attribute_decorator.rb

Instance Method Summary collapse

Constructor Details

#initializeAttributeDecorator

Returns a new instance of AttributeDecorator.



6
7
8
9
# File 'lib/saml_idp/attribute_decorator.rb', line 6

def initialize(*)
  super
  __setobj__((source || {}).with_indifferent_access)
end

Instance Method Details

#friendly_nameObject



15
16
17
# File 'lib/saml_idp/attribute_decorator.rb', line 15

def friendly_name
  source[:friendly_name]
end

#nameObject



11
12
13
# File 'lib/saml_idp/attribute_decorator.rb', line 11

def name
  source[:name]
end

#name_formatObject



19
20
21
# File 'lib/saml_idp/attribute_decorator.rb', line 19

def name_format
  source[:name_format] || Saml::XML::Namespaces::Formats::Attr::URI
end

#valuesObject



23
24
25
# File 'lib/saml_idp/attribute_decorator.rb', line 23

def values
  Array(source[:values])
end