Class: BulkOps::WorkProxy

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/bulk_ops/work_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_errorsObject

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_holdObject



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_holdObject



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

#workObject



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_typeObject



24
25
26
# File 'lib/bulk_ops/work_proxy.rb', line 24

def work_type
  super || operation.work_type || "Work"
end