module DSO
Public Class Methods
new(dobj)
click to toggle source
instanciates a wrapper object for the given dobj, which must derive from org.dspace.content.DSpaceObject
the wrapper object's class must be compatible with the type of the given dobj
# File lib/dspace/dso.rb, line 12 def initialize(dobj) @obj = dobj if dobj then myname = self.class.name raise "can't create #{myname} object from #{@obj}" if myname[1..-1] != @obj.getClass.getName.split('.')[-1] end end
Public Instance Methods
dso()
click to toggle source
# File lib/dspace/dso.rb, line 20 def dso return @obj end
inspect()
click to toggle source
# File lib/dspace/dso.rb, line 24 def inspect return "nil" if @obj.nil? return "#<#{self.class.name}:#{@obj.getID}>" end