Class: ActiveFedora::Associations::DeleteProxy
- Inherits:
-
Object
- Object
- ActiveFedora::Associations::DeleteProxy
- Defined in:
- lib/active_fedora/associations/delete_proxy.rb
Instance Attribute Summary collapse
-
#proxy_class ⇒ Object
readonly
Returns the value of attribute proxy_class.
-
#proxy_ids ⇒ Object
readonly
Returns the value of attribute proxy_ids.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(proxy_ids:, proxy_class:) ⇒ DeleteProxy
constructor
A new instance of DeleteProxy.
- #run ⇒ Object
Constructor Details
#initialize(proxy_ids:, proxy_class:) ⇒ DeleteProxy
Returns a new instance of DeleteProxy.
8 9 10 11 |
# File 'lib/active_fedora/associations/delete_proxy.rb', line 8 def initialize(proxy_ids:, proxy_class:) @proxy_ids = proxy_ids @proxy_class = proxy_class end |
Instance Attribute Details
#proxy_class ⇒ Object (readonly)
Returns the value of attribute proxy_class.
6 7 8 |
# File 'lib/active_fedora/associations/delete_proxy.rb', line 6 def proxy_class @proxy_class end |
#proxy_ids ⇒ Object (readonly)
Returns the value of attribute proxy_ids.
6 7 8 |
# File 'lib/active_fedora/associations/delete_proxy.rb', line 6 def proxy_ids @proxy_ids end |
Class Method Details
.call(proxy_ids:, proxy_class:) ⇒ Object
3 4 5 |
# File 'lib/active_fedora/associations/delete_proxy.rb', line 3 def self.call(proxy_ids:, proxy_class:) new(proxy_ids: proxy_ids, proxy_class: proxy_class).run end |
Instance Method Details
#run ⇒ Object
13 14 15 |
# File 'lib/active_fedora/associations/delete_proxy.rb', line 13 def run proxies.each(&:delete) end |