Class: Saml::Kit::Organization

Inherits:
Object
  • Object
show all
Includes:
XmlParseable
Defined in:
lib/saml/kit/organization.rb

Constant Summary

Constants included from XmlParseable

XmlParseable::NAMESPACES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XmlParseable

#present?, #to_h, #to_s, #to_xhtml, #to_xml

Constructor Details

#initialize(node) ⇒ Organization

Returns a new instance of Organization.



10
11
12
13
# File 'lib/saml/kit/organization.rb', line 10

def initialize(node)
  @to_nokogiri = node
  @content = node.to_s
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



8
9
10
# File 'lib/saml/kit/organization.rb', line 8

def content
  @content
end

Instance Method Details

#nameObject

Returns the Organization Name



16
17
18
# File 'lib/saml/kit/organization.rb', line 16

def name
  at_xpath('./md:OrganizationName').try(:text)
end

#urlObject

Returns the Organization URL



21
22
23
# File 'lib/saml/kit/organization.rb', line 21

def url
  at_xpath('./md:OrganizationURL').try(:text)
end