Class: Ldp::Container::Indirect

Inherits:
Direct show all
Defined in:
lib/ldp/container/indirect.rb

Instance Attribute Summary

Attributes inherited from Resource

#client, #content, #subject

Instance Method Summary collapse

Methods inherited from Direct

#member_relation

Methods inherited from Ldp::Container

#add, #contains, for

Methods inherited from Resource::RdfSource

#build_empty_graph, #content, #create, #graph, #graph_class, #initialize, #response_graph

Methods inherited from Resource

#create, #current?, #delete, for, #get, #head, #initialize, #new?, #reload, #retrieved_content?, #save, #subject_uri, #update, #update_cached_get

Constructor Details

This class inherits a constructor from Ldp::Resource::RdfSource

Instance Method Details

#membersObject



3
4
5
6
7
8
9
# File 'lib/ldp/container/indirect.rb', line 3

def members
  return enum_for(:members) unless block_given?

  response_graph.query(predicate: member_relation, object: subject).map do |x|
    yield rdf_source_for(x.object)
  end
end