Method: OpenID::AX.to_type_uris
- Defined in:
- lib/openid/extensions/ax.rb
.to_type_uris(namespace_map, alias_list_s) ⇒ Object
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
97 98 99 100 101 102 103 104 |
# File 'lib/openid/extensions/ax.rb', line 97 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 |