Class: VagrantPlugins::Itamae::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-itamae/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
17
18
19
20
# File 'lib/vagrant-itamae/config.rb', line 13

def initialize
  @recipes = UNSET_VALUE
  @json    = UNSET_VALUE
  @yaml    = UNSET_VALUE
  @sudo    = UNSET_VALUE
  @shell   = UNSET_VALUE
  @log_level = UNSET_VALUE
end

Instance Attribute Details

#jsonObject

Returns the value of attribute json.



6
7
8
# File 'lib/vagrant-itamae/config.rb', line 6

def json
  @json
end

#log_levelObject

Returns the value of attribute log_level.



11
12
13
# File 'lib/vagrant-itamae/config.rb', line 11

def log_level
  @log_level
end

#recipesObject

Returns the value of attribute recipes.



9
10
11
# File 'lib/vagrant-itamae/config.rb', line 9

def recipes
  @recipes
end

#shellObject

Returns the value of attribute shell.



10
11
12
# File 'lib/vagrant-itamae/config.rb', line 10

def shell
  @shell
end

#sudoObject

Returns the value of attribute sudo.



8
9
10
# File 'lib/vagrant-itamae/config.rb', line 8

def sudo
  @sudo
end

#yamlObject

Returns the value of attribute yaml.



7
8
9
# File 'lib/vagrant-itamae/config.rb', line 7

def yaml
  @yaml
end

Instance Method Details

#finalize!Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/vagrant-itamae/config.rb', line 22

def finalize!
  @recipes = [] if @recipes == UNSET_VALUE
  @recipes = Array(@recipes)

  @json = nil if @json == UNSET_VALUE
  @yaml = nil if @yaml == UNSET_VALUE
  @shell = nil if @shell == UNSET_VALUE

  @sudo = false if @sudo == UNSET_VALUE

  @log_level = ::Logger.const_get((@log_level == UNSET_VALUE ? :info : @log_level).upcase)
end