Module Namespaces
In: lib/semantic_record/namespaces.rb


register   resolve  

Classes and Modules

Class Namespaces::NoNamespaceError
Class Namespaces::NoPredicateError

Public Class methods

register new namespaces, can process multiple namespaces at once format is {:key => "value"}


    # File lib/semantic_record/namespaces.rb, line 20
20:   def self.register(pair)
21:     pair.each do |key,value|
22:       @namespace[key.to_sym] = value
23:     end
24:   end

expand namespace to full uri key can be either symbol oder string


    # File lib/semantic_record/namespaces.rb, line 12
12:   def self.resolve(name)
13:     @namespace[name.to_sym].blank? ? (raise NoNamespaceError,"no matching namespace found") : @namespace[name.to_sym]
14:   end