Redland RDF Application Framework - Ruby RDoc - Class: Redland::World

Go to Redland Home - Language Bindings Home - Ruby API Home

Class | Redland::World
In: | rdf/redland.rb
Parent: | Object

The world object is the single global variable in Redland that all the classes, their factories and implementations reference.

In most programs there should be only one Redland world, using multiple models although multiple worlds are possible.

### Methods

create_finalizer new

### Attributes

world | [RW] | include Singleton

### Public Class methods

create_finalizer(world)

[Source]

    # File rdf/redland.rb, line 54
        def World.create_finalizer(world)
          proc {|id| "Finalizer on #{id}"
            #log_final.info "closing world"
            # This is commented out because Ruby fails to guarantee this
            # is called after all other redland destructors
            #Redland::librdf_free_world world
          }
        end

new()

Create new RDF World object (constructor)

[Source]

    # File rdf/redland.rb, line 48
        def initialize()
          @world = Redland::librdf_new_world()
          Redland::librdf_world_open(@world)
          ObjectSpace.define_finalizer(self,World.create_finalizer(@world))
        end

Go to Redland Home - Language Bindings Home - Ruby API Home

(C) Copyright 2004-2011 Dave Beckett, (C) Copyright 2004-2005 University of Bristol