Class: LicenseAcceptance::Strategy::Environment

Inherits:
Base
  • Object
show all
Defined in:
lib/license_acceptance/strategy/environment.rb

Overview

Look for acceptance values in the environment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Environment

Returns a new instance of Environment.


11
12
13
# File 'lib/license_acceptance/strategy/environment.rb', line 11

def initialize(env)
  @env = env
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env


9
10
11
# File 'lib/license_acceptance/strategy/environment.rb', line 9

def env
  @env
end

Instance Method Details

#accepted?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/license_acceptance/strategy/environment.rb', line 15

def accepted?
  look_for_value(ACCEPT)
end

#no_persist?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'lib/license_acceptance/strategy/environment.rb', line 23

def no_persist?
  look_for_value(ACCEPT_NO_PERSIST)
end

#silent?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'lib/license_acceptance/strategy/environment.rb', line 19

def silent?
  look_for_value(ACCEPT_SILENT)
end