Class: LicenseAcceptance::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Config

Returns a new instance of Config.


7
8
9
10
11
12
13
14
# File 'lib/license_acceptance/config.rb', line 7

def initialize(opts={})
  @output = opts.fetch(:output, $stdout)
  @logger = opts.fetch(:logger, ::Logger.new(IO::NULL))
  @license_locations = opts.fetch(:license_locations, default_license_locations)
  @license_locations = [ @license_locations ].flatten
  @persist_location = opts.fetch(:persist_location, default_persist_location)
  @persist = opts.fetch(:persist, true)
end

Instance Attribute Details

#license_locationsObject

Returns the value of attribute license_locations


5
6
7
# File 'lib/license_acceptance/config.rb', line 5

def license_locations
  @license_locations
end

#loggerObject

Returns the value of attribute logger


5
6
7
# File 'lib/license_acceptance/config.rb', line 5

def logger
  @logger
end

#outputObject

Returns the value of attribute output


5
6
7
# File 'lib/license_acceptance/config.rb', line 5

def output
  @output
end

#persistObject

Returns the value of attribute persist


5
6
7
# File 'lib/license_acceptance/config.rb', line 5

def persist
  @persist
end

#persist_locationObject

Returns the value of attribute persist_location


5
6
7
# File 'lib/license_acceptance/config.rb', line 5

def persist_location
  @persist_location
end