Class: MediaWikiVagrant::LsbCheck::Config
- Defined in:
- lib/mediawiki-vagrant/lsb_check/config.rb
Instance Attribute Summary collapse
-
#vendor ⇒ Object
Returns the value of attribute vendor.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(_machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
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
#vendor ⇒ Object
Returns the value of attribute vendor.
4 5 6 |
# File 'lib/mediawiki-vagrant/lsb_check/config.rb', line 4 def vendor @vendor end |
#version ⇒ Object
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 |