Class: LicenseAcceptance::Strategy::ProvidedValue

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

Overview

Used for library consumers to parse their own form of acceptance (knife config, omnibus config, etc.) and pass it in

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ProvidedValue

Returns a new instance of ProvidedValue.


10
11
12
# File 'lib/license_acceptance/strategy/provided_value.rb', line 10

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value


8
9
10
# File 'lib/license_acceptance/strategy/provided_value.rb', line 8

def value
  @value
end

Instance Method Details

#accepted?Boolean

Returns:

  • (Boolean)

14
15
16
# File 'lib/license_acceptance/strategy/provided_value.rb', line 14

def accepted?
  value == ACCEPT
end

#no_persist?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/license_acceptance/strategy/provided_value.rb', line 22

def no_persist?
  value == ACCEPT_NO_PERSIST
end

#silent?Boolean

Returns:

  • (Boolean)

18
19
20
# File 'lib/license_acceptance/strategy/provided_value.rb', line 18

def silent?
  value == ACCEPT_SILENT
end