app/models/proquest_behaviors.rb
# Determine ProQuest embargo code
# 0 = no embargo
# 1 = 6 month embargo
# 2 = 1 year embargo
# 3 = 2 year embargo
Determine ProQuest embargo code
0 = no embargo
1 = 6 month embargo
2 = 1 year embargo
3 = 2 year embargo
Determine ProQuest embargo code 0 = no embargo 1 = 6 month embargo 2 = 1 year embargo 3 = 2 year embargo
def embargo_code
    case embargo_length
    when nil
      0
    when "6 months"
      1
    when "1 year"
      2
    when "2 years"
      3
    when "6 years"
      4
    else
      4
    end
  end
def embargo_code case embargo_length when nil 0 when "6 months" 1 when "1 year" 2 when "2 years" 3 when "6 years" 4 else 4 end end
Determine ProQuest embargo code
0 = no embargo
1 = 6 month embargo
2 = 1 year embargo
3 = 2 year embargo
Determine ProQuest embargo code 0 = no embargo 1 = 6 month embargo 2 = 1 year embargo 3 = 2 year embargo