Sha256: a57b56eede45df4ab8847856d531a9db04f27a99ccc3bb115236b275b9a89a5c
Contents?: true
Size: 550 Bytes
Versions: 16
Compression:
Stored size: 550 Bytes
Contents
module Ldp class Container::Basic < Container def members return enum_for(:members) unless block_given? contains.each { |k, x| yield x } end def contains @contains ||= Hash[get.graph.query(predicate: Ldp.contains).map do |x| [x.object, Ldp::Resource::RdfSource.new(client, x.object, contained_graph(x.object))] end] end private def contained_graph subject g = RDF::Graph.new get.graph.query(subject: subject) do |stmt| g << stmt end g end end end
Version data entries
16 entries across 16 versions & 1 rubygems