module OpenID::AX
Constants
- MINIMUM_SUPPORTED_ALIAS_LENGTH
- UNLIMITED_VALUES
Public Class Methods
check_alias(name)
click to toggle source
check alias for invalid characters, raise AXError if found
# File lib/openid/extensions/ax.rb, line 14 def self.check_alias(name) if name.match(/(,|\.)/) raise Error, ("Alias #{name.inspect} must not contain a " "comma or period.") end end
to_type_uris(namespace_map, alias_list_s)
click to toggle source
Given a namespace mapping and a string containing a comma-separated list of namespace aliases, return a list of type URIs that correspond to those aliases. namespace_map: OpenID::NamespaceMap
# File lib/openid/extensions/ax.rb, line 104 def self.to_type_uris(namespace_map, alias_list_s) return [] if alias_list_s.nil? alias_list_s.split(',').inject([]) {|uris, name| type_uri = namespace_map.get_namespace_uri(name) raise IndexError, "No type defined for attribute name #{name.inspect}" if type_uri.nil? uris << type_uri } end