Class: VagrantSyllabusProvisioner::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_syllabus_provisioner/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



7
8
9
# File 'lib/vagrant_syllabus_provisioner/config.rb', line 7

def initialize
  @files = UNSET_VALUE
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



5
6
7
# File 'lib/vagrant_syllabus_provisioner/config.rb', line 5

def files
  @files
end

Instance Method Details

#finalize!Object



11
12
13
# File 'lib/vagrant_syllabus_provisioner/config.rb', line 11

def finalize!
  @files = nil if @files == UNSET_VALUE
end

#validate(machine) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/vagrant_syllabus_provisioner/config.rb', line 15

def validate(machine)
  if @files && !@files.is_a?(Array)
    return {"syllabus" => ["files must be an array"]}
  end

  {}
end