Module: Spira::Utils

Included in:
Base
Defined in:
lib/spira/utils.rb

Instance Method Summary collapse

Instance Method Details

#rename!(new_subject, repository = nil) ⇒ Spira::Base

Rename the subject of a Spira object to something else

Parameters:

  • new_subject (RDF::Resource)
  • repository (RDF::Repository) (defaults to: nil)

Returns:



8
9
10
11
12
# File 'lib/spira/utils.rb', line 8

def rename!(new_subject, repository = nil)
  repository ||= Spira.repository
  repository.rename!(subject, new_subject)
  self.class.for(new_subject)
end