Class: PEBuild::Config::Global

Inherits:
Object
  • Object
show all
Includes:
PEBuild::ConfigDefault
Defined in:
lib/pe_build/config/global.rb

Direct Known Subclasses

PEBootstrap

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobal

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_rootObject



9
10
11
# File 'lib/pe_build/config/global.rb', line 9

def download_root
  @download_root
end

#filenameObject



18
19
20
# File 'lib/pe_build/config/global.rb', line 18

def filename
  @filename
end

#suffixObject



15
16
17
# File 'lib/pe_build/config/global.rb', line 15

def suffix
  @suffix
end

#versionObject



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