Class: PEBuild::Config::Global
- Inherits:
-
Object
- Object
- PEBuild::Config::Global
- Includes:
- PEBuild::ConfigDefault
- Defined in:
- lib/pe_build/config/global.rb
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Global
constructor
A new instance of Global.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Global
Returns a new instance of Global.
20 21 22 23 24 25 |
# File 'lib/pe_build/config/global.rb', line 20 def initialize @download_root = UNSET_VALUE @version = UNSET_VALUE @suffix = UNSET_VALUE @filename = UNSET_VALUE end |
Instance Attribute Details
#download_root ⇒ Object
9 10 11 |
# File 'lib/pe_build/config/global.rb', line 9 def download_root @download_root end |
#filename ⇒ Object
18 19 20 |
# File 'lib/pe_build/config/global.rb', line 18 def filename @filename end |
#suffix ⇒ Object
15 16 17 |
# File 'lib/pe_build/config/global.rb', line 15 def suffix @suffix end |
#version ⇒ Object
12 13 14 |
# File 'lib/pe_build/config/global.rb', line 12 def version @version end |
Instance Method Details
#finalize! ⇒ Object
29 30 31 32 33 |
# File 'lib/pe_build/config/global.rb', line 29 def finalize! set_default :@suffix, :detect set_default :@download_root, nil set_default :@filename, nil end |
#validate(machine) ⇒ Object
TODO:
Convert error strings to I18n
36 37 38 39 40 41 42 43 |
# File 'lib/pe_build/config/global.rb', line 36 def validate(machine) errors = [] validate_version(errors, machine) validate_download_root(errors, machine) {"PE build global config" => errors} end |