Class: BulkOps::WorkProxy
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BulkOps::WorkProxy
- Defined in:
- lib/bulk_ops/work_proxy.rb
Instance Attribute Summary collapse
-
#proxy_errors ⇒ Object
Returns the value of attribute proxy_errors.
Instance Method Summary collapse
-
#initialize(*args) ⇒ WorkProxy
constructor
A new instance of WorkProxy.
- #lift_hold ⇒ Object
- #place_hold ⇒ Object
- #work ⇒ Object
- #work_type ⇒ Object
Constructor Details
#initialize(*args) ⇒ WorkProxy
Returns a new instance of WorkProxy.
9 10 11 12 |
# File 'lib/bulk_ops/work_proxy.rb', line 9 def initialize *args super *args place_hold if @work_id end |
Instance Attribute Details
#proxy_errors ⇒ Object
Returns the value of attribute proxy_errors.
7 8 9 |
# File 'lib/bulk_ops/work_proxy.rb', line 7 def proxy_errors @proxy_errors end |
Instance Method Details
#lift_hold ⇒ Object
32 33 34 |
# File 'lib/bulk_ops/work_proxy.rb', line 32 def lift_hold # TODO make it so people can edit the work again end |
#place_hold ⇒ Object
28 29 30 |
# File 'lib/bulk_ops/work_proxy.rb', line 28 def place_hold # TODO make it so nobody can edit the work end |
#work ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/bulk_ops/work_proxy.rb', line 14 def work return @work if @work begin @work = ActiveFedora::Base.find(work_id) rescue return false end return @work end |
#work_type ⇒ Object
24 25 26 |
# File 'lib/bulk_ops/work_proxy.rb', line 24 def work_type super || operation.work_type || "Work" end |