Class: MediaWikiVagrant::LsbCheck::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mediawiki-vagrant/lsb_check/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



7
8
9
10
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 7

def initialize
  @vendor = UNSET_VALUE
  @version = UNSET_VALUE
end

Instance Attribute Details

#vendorObject

Returns the value of attribute vendor.



4
5
6
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 4

def vendor
  @vendor
end

#versionObject

Returns the value of attribute version.



5
6
7
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 5

def version
  @version
end

Instance Method Details

#finalize!Object



12
13
14
15
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 12

def finalize!
  @vendor = 'Ubuntu' if @vendor == UNSET_VALUE
  @version = nil if @version == UNSET_VALUE
end

#validate(_machine) ⇒ Object



17
18
19
20
21
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 17

def validate(_machine)
  errors = _detected_errors
  errors << '`version` must be set.' unless version
  { 'lsb_check provisioner' => errors }
end