Class: Dor::Etd
- Includes:
- Embargoable
- Defined in:
- lib/dor/models/etd.rb
Instance Method Summary collapse
Methods included from Embargoable
#embargo_service, #embargoed?, #release_20_pct_vis_embargo, #release_embargo, #update_embargo
Methods inherited from Abstract
#adapt_to_cmodel, #add_collection, #allows_modification?, assign_pid, #current_version, #druid_regex, has_object_type, #pid_regex, #read_rights=, #reapply_admin_policy_object_defaults, #remove_collection, #remove_druid_prefix, #to_solr
Instance Method Details
#etd_embargo_date ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/dor/models/etd.rb', line 79 def regaction = properties.regactiondttm.first = properties..first if properties.regapproval.first =~ /^approved$/i && !.nil? && != '' && !regaction.nil? && regaction != '' = case when /6 months/i 6 when /1 year/i 12 when /2 years/i 24 else 0 end return Time.strptime(regaction, '%m/%d/%Y %H:%M:%S') + .months end nil end |