Class: RDF::Raptor::FFI::V2::Namespace

Inherits:
FFI::Struct
  • Object
show all
Includes:
RDF::Raptor::FFI
Defined in:
lib/rdf/raptor/ffi/v2/namespace.rb

Overview

Constant Summary

Constants included from RDF::Raptor::FFI

ENGINE

Instance Method Summary collapse

Methods included from RDF::Raptor::FFI

#version

Instance Method Details

#free Also known as: release

This method returns an undefined value.

Releases libraptor memory associated with this structure.



33
34
35
# File 'lib/rdf/raptor/ffi/v2/namespace.rb', line 33

def free
  V2.raptor_free_namespace(self) unless ptr.null?
end

#prefixObject



17
18
19
# File 'lib/rdf/raptor/ffi/v2/namespace.rb', line 17

def prefix
  self[:prefix].to_s
end

#prefix_lengthObject



21
22
23
# File 'lib/rdf/raptor/ffi/v2/namespace.rb', line 21

def prefix_length
  self[:prefix_length]
end

#uriObject



25
26
27
# File 'lib/rdf/raptor/ffi/v2/namespace.rb', line 25

def uri
  RDF::URI.new(V2.raptor_uri_as_string(self[:uri]))
end