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.



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

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

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/saml/kit/organization.rb', line 6

def content
  @content
end

Instance Method Details

#nameObject

Returns the Organization Name



14
15
16
# File 'lib/saml/kit/organization.rb', line 14

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

#urlObject

Returns the Organization URL



19
20
21
# File 'lib/saml/kit/organization.rb', line 19

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