Sha256: 9ca974e3cc7260270699323a2c4d8d91f11ec77ab735856bbf27cf06bedefb5c
Contents?: true
Size: 550 Bytes
Versions: 24
Compression:
Stored size: 550 Bytes
Contents
class TimeSpan < ActiveTriples::Resource def initialize(uri = RDF::Node.new, _parent = ActiveTriples::Resource.new) uri = if uri.try(:node?) RDF::URI("#timespan_#{uri.to_s.gsub('_:', '')}") elsif uri.to_s.include?('#') RDF::URI(uri) end super end def persisted? !new_record? end def new_record? id.start_with?('#') end configure type: ::RDF::Vocab::EDM.TimeSpan property :start, predicate: ::RDF::Vocab::EDM.begin property :finish, predicate: ::RDF::Vocab::EDM.end end
Version data entries
24 entries across 24 versions & 1 rubygems