Class: LicenseAcceptance::EnvAcceptance

Inherits:
Object
  • Object
show all
Defined in:
lib/license_acceptance/env_acceptance.rb

Instance Method Summary collapse

Instance Method Details

#check(env) ⇒ Object



4
5
6
7
8
9
# File 'lib/license_acceptance/env_acceptance.rb', line 4

def check(env)
  if env['CHEF_LICENSE'] && env['CHEF_LICENSE'].downcase == 'accept'
    return true
  end
  return false
end

#check_no_persist(env) ⇒ Object



11
12
13
14
15
16
# File 'lib/license_acceptance/env_acceptance.rb', line 11

def check_no_persist(env)
  if env['CHEF_LICENSE'] && env['CHEF_LICENSE'].downcase == 'accept-no-persist'
    return true
  end
  return false
end