Class: SAML2::Organization
Instance Attribute Summary collapse
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Base
Instance Method Summary collapse
- #build(builder) ⇒ Object
- #from_xml(node) ⇒ Object
-
#initialize(name = nil, display_name = nil, url = nil) ⇒ Organization
constructor
A new instance of Organization.
Methods inherited from Base
from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize(name = nil, display_name = nil, url = nil) ⇒ Organization
Returns a new instance of Organization.
15 16 17 18 19 |
# File 'lib/saml2/organization.rb', line 15 def initialize(name = nil, display_name = nil, url = nil) @name = LocalizedName.new('OrganizationName', name) @display_name = LocalizedName.new('OrganizationDisplayName', display_name) @url = LocalizedName.new('OrganizationURL', url) end |
Instance Attribute Details
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
7 8 9 |
# File 'lib/saml2/organization.rb', line 7 def display_name @display_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/saml2/organization.rb', line 7 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/saml2/organization.rb', line 7 def url @url end |
Instance Method Details
#build(builder) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/saml2/organization.rb', line 21 def build(builder) builder['md'].Organization do |organization| @name.build(organization) @display_name.build(organization) @url.build(organization) end end |
#from_xml(node) ⇒ Object
9 10 11 12 13 |
# File 'lib/saml2/organization.rb', line 9 def from_xml(node) name.from_xml(node.xpath('md:OrganizationName', Namespaces::ALL)) display_name.from_xml(node.xpath('md:OrganizationDisplayName', Namespaces::ALL)) url.from_xml(node.xpath('md:OrganizationURL', Namespaces::ALL)) end |