# File lib/rdf/redland/model.rb, line 345 def contexts() my_iterator = Redland.librdf_model_get_contexts(@model) raise RedlandError.new("Unable to create iterator for contexts") if !my_iterator iterator= NodeIterator.new(my_iterator,self) if block_given? while not iterator.end? yield iterator.current iterator.next end else context_array = [] while not iterator.end? context_array << iterator.current iterator.next end return context_array end end