Class: SAML2::Organization
Instance Attribute Summary collapse
- #display_name ⇒ LocalizedName readonly
- #name ⇒ LocalizedName readonly
- #url ⇒ LocalizedName readonly
Attributes inherited from Base
Instance Method Summary collapse
-
#build(builder) ⇒ void
Serialize this object to XML, as part of a larger document.
-
#from_xml(node) ⇒ void
Parse an XML element into this object.
-
#initialize(name = nil, display_name = nil, url = nil) ⇒ Organization
constructor
A new instance of Organization.
Methods inherited from Base
#decrypt, 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.
19 20 21 22 23 24 |
# File 'lib/saml2/organization.rb', line 19 def initialize(name = nil, display_name = nil, url = nil) super() @name = LocalizedName.new("OrganizationName", name) @display_name = LocalizedName.new("OrganizationDisplayName", display_name) @url = LocalizedName.new("OrganizationURL", url) end |
Instance Attribute Details
#display_name ⇒ LocalizedName (readonly)
10 11 12 |
# File 'lib/saml2/organization.rb', line 10 def display_name @display_name end |
#name ⇒ LocalizedName (readonly)
10 11 12 |
# File 'lib/saml2/organization.rb', line 10 def name @name end |
#url ⇒ LocalizedName (readonly)
10 11 12 |
# File 'lib/saml2/organization.rb', line 10 def url @url end |
Instance Method Details
#build(builder) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
27 28 29 30 31 32 33 |
# File 'lib/saml2/organization.rb', line 27 def build(builder) builder["md"].Organization do |organization| @name.build(organization) @display_name.build(organization) @url.build(organization) end end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
13 14 15 16 17 |
# File 'lib/saml2/organization.rb', line 13 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 |