Method: CHBuild::Config::Version#validate!

Defined in:
lib/chbuild/config/version.rb

#validate!(version) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/chbuild/config/version.rb', line 18

def validate!(version)
  @errors = []
  if version.nil?
    @errors << 'Required'
    return
  end
  @errors << "Unknown value: '#{version}'" unless ALLOWED_VALUES.include? version
end