Top Level Namespace

Defined Under Namespace

Modules: RDF Classes: Array

Instance Method Summary collapse

Instance Method Details

#ID(id, ns = {}) ⇒ Object

Shortcut to parse IDs



42
43
44
# File 'lib/lightrdf/id.rb', line 42

def ID id, ns={}
  RDF::ID.parse id, ns
end

#Namespace(prefix, uri) ⇒ Object

Shortcut to declare namespaces



46
47
48
# File 'lib/lightrdf/id.rb', line 46

def Namespace prefix, uri
  RDF::ID.ns[prefix.to_sym] = uri
end

#Node(id, graph = nil) ⇒ Object



117
118
119
# File 'lib/lightrdf/node.rb', line 117

def Node id, graph=nil
  graph ? graph[id] : RDF::Node.new(id)
end