triple.rb 270 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 class VirtuosoPlugin::Triple attr_accessor :graph, :subject, :predicate, :object def object=(value) @object = format_triple_term(value) end protected def format_triple_term(term) term =~ /^(http|https):\/\// ? "<#{term}>" : "'#{term}'" end end