Class: RDF::Literal

Inherits:
Object
  • Object
show all
Defined in:
lib/rdf/spec/inspects.rb

Overview

override several inspect functions to improve output for what we’re doing

Instance Method Summary collapse

Instance Method Details

#inspectObject



5
6
7
8
9
# File 'lib/rdf/spec/inspects.rb', line 5

def inspect
  klass = self.class.to_s.match(/([^:]*)$/).to_s
  dt = self.datatype
  "\"#{escape(value)}\"#{('@' + self.language.to_s) if self.language?} R:L:(#{klass == 'Literal' && dt ? dt : klass})"
end