Sha256: 0e8abaadfa1ef1c48e54d17bb6e7ef9b2408efcc74ebdb1a4878c191db6b1124

Contents?: true

Size: 437 Bytes

Versions: 16

Compression:

Stored size: 437 Bytes

Contents

module Ldp
  class Container::Direct < Container::Basic
    def members
      return enum_for(:members) unless block_given?
      
      get.graph.query(subject: subject, predicate: member_relation).map do |x| 
        yield contains[x.object] || Ldp::Resource::RdfSource.new(client, x.object)
      end
    end
    
    def member_relation
      graph.first_object(predicate: Ldp.hasMemberRelation) || Ldp.member
    end
    
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ldp-0.4.1 lib/ldp/container/direct.rb
ldp-0.4.0 lib/ldp/container/direct.rb
ldp-0.3.1 lib/ldp/container/direct.rb
ldp-0.3.0 lib/ldp/container/direct.rb
ldp-0.2.3 lib/ldp/container/direct.rb
ldp-0.2.2 lib/ldp/container/direct.rb
ldp-0.2.1 lib/ldp/container/direct.rb
ldp-0.2.0 lib/ldp/container/direct.rb
ldp-0.1.0 lib/ldp/container/direct.rb
ldp-0.0.10 lib/ldp/container/direct.rb
ldp-0.0.9 lib/ldp/container/direct.rb
ldp-0.0.8 lib/ldp/container/direct.rb
ldp-0.0.7 lib/ldp/container/direct.rb
ldp-0.0.6 lib/ldp/container/direct.rb
ldp-0.0.5 lib/ldp/container/direct.rb
ldp-0.0.4 lib/ldp/container/direct.rb