Class: Ldp::Container::Basic
- Inherits:
-
Ldp::Container
- Object
- Resource
- Resource::RdfSource
- Ldp::Container
- Ldp::Container::Basic
- Defined in:
- lib/ldp/container/basic.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Ldp::Container
Methods inherited from Resource::RdfSource
#build_empty_graph, #content, #create, #graph, #graph_class, #initialize
Methods inherited from Resource
#create, #current?, #delete, #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
#contains ⇒ Object
8 9 10 11 12 |
# File 'lib/ldp/container/basic.rb', line 8 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 |
#members ⇒ Object
3 4 5 6 |
# File 'lib/ldp/container/basic.rb', line 3 def members return enum_for(:members) unless block_given? contains.each { |k, x| yield x } end |