Class: ASpaceImport::RecordProxyMgr
- Inherits:
-
Object
- Object
- ASpaceImport::RecordProxyMgr
- Defined in:
- backend/app/converters/lib/record_proxy.rb
Instance Method Summary (collapse)
-
- (Object) discharge_proxy(proxy_key, proxied_obj)
the object appears, and the proxy can be discharged.
-
- (Object) get_proxy_for(proxy_key, record_type = nil)
-
- (RecordProxyMgr) initialize
constructor
A new instance of RecordProxyMgr.
-
- (Object) undischarged
Constructor Details
- (RecordProxyMgr) initialize
Returns a new instance of RecordProxyMgr
5 6 7 |
# File 'backend/app/converters/lib/record_proxy.rb', line 5 def initialize @proxies = {} end |
Instance Method Details
- (Object) discharge_proxy(proxy_key, proxied_obj)
the object appears, and the proxy can be discharged
22 23 24 25 26 27 |
# File 'backend/app/converters/lib/record_proxy.rb', line 22 def discharge_proxy(proxy_key, proxied_obj) if @proxies.has_key?(proxy_key) @proxies[proxy_key].discharge(proxied_obj) @proxies.delete(proxy_key) end end |
- (Object) get_proxy_for(proxy_key, record_type = nil)
10 11 12 13 14 15 16 17 |
# File 'backend/app/converters/lib/record_proxy.rb', line 10 def get_proxy_for(proxy_key, record_type = nil) unless @proxies.has_key?(proxy_key) @proxies[proxy_key] = RecordProxy.new(proxy_key, record_type) end @proxies[proxy_key] end |
- (Object) undischarged
30 31 32 33 34 35 36 37 38 |
# File 'backend/app/converters/lib/record_proxy.rb', line 30 def undischarged undis = [] @proxies.each do |type, proxy| unless proxy.discharged undis << proxy end end undis end |