Class: LicenseAcceptance::Strategy::Argument

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

Overview

Look for acceptance values in the ARGV

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Argument

Returns a new instance of Argument.


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

def initialize(argv)
  @argv = argv
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv


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

def argv
  @argv
end

Instance Method Details

#accepted?Boolean

Returns:

  • (Boolean)

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

def accepted?
  look_for_value(ACCEPT)
end

#no_persist?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'lib/license_acceptance/strategy/argument.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/argument.rb', line 19

def silent?
  look_for_value(ACCEPT_SILENT)
end