Class: VagrantPlugins::Itamae::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::Itamae::Config
- Defined in:
- lib/vagrant-itamae/config.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
Returns the value of attribute json.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#recipes ⇒ Object
Returns the value of attribute recipes.
-
#shell ⇒ Object
Returns the value of attribute shell.
-
#sudo ⇒ Object
Returns the value of attribute sudo.
-
#yaml ⇒ Object
Returns the value of attribute yaml.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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
#json ⇒ Object
Returns the value of attribute json.
6 7 8 |
# File 'lib/vagrant-itamae/config.rb', line 6 def json @json end |
#log_level ⇒ Object
Returns the value of attribute log_level.
11 12 13 |
# File 'lib/vagrant-itamae/config.rb', line 11 def log_level @log_level end |
#recipes ⇒ Object
Returns the value of attribute recipes.
9 10 11 |
# File 'lib/vagrant-itamae/config.rb', line 9 def recipes @recipes end |
#shell ⇒ Object
Returns the value of attribute shell.
10 11 12 |
# File 'lib/vagrant-itamae/config.rb', line 10 def shell @shell end |
#sudo ⇒ Object
Returns the value of attribute sudo.
8 9 10 |
# File 'lib/vagrant-itamae/config.rb', line 8 def sudo @sudo end |
#yaml ⇒ Object
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 |