Class: ActiveFedora::Associations::RecordComposite
- Inherits:
-
Object
- Object
- ActiveFedora::Associations::RecordComposite
- Includes:
- Enumerable
- Defined in:
- lib/active_fedora/associations/record_composite.rb
Overview
A Composite for records - currently only supports delete interface. The goal is to push commands down to the containing records.
Defined Under Namespace
Classes: Repository
Instance Attribute Summary collapse
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Instance Method Summary collapse
- #delete ⇒ Object
- #each ⇒ Object
-
#initialize(records:) ⇒ RecordComposite
constructor
A new instance of RecordComposite.
Constructor Details
#initialize(records:) ⇒ RecordComposite
Returns a new instance of RecordComposite.
8 9 10 |
# File 'lib/active_fedora/associations/record_composite.rb', line 8 def initialize(records:) @records = records end |
Instance Attribute Details
#records ⇒ Object (readonly)
Returns the value of attribute records.
6 7 8 |
# File 'lib/active_fedora/associations/record_composite.rb', line 6 def records @records end |
Instance Method Details
#delete ⇒ Object
18 19 20 |
# File 'lib/active_fedora/associations/record_composite.rb', line 18 def delete each(&:delete) end |
#each ⇒ Object
12 13 14 15 16 |
# File 'lib/active_fedora/associations/record_composite.rb', line 12 def each records.each do |record| yield record end end |