Class: Vagrant::Puppetfile::Config
- Inherits:
-
Object
- Object
- Vagrant::Puppetfile::Config
- Defined in:
- lib/vagrant/puppetfile.rb
Instance Attribute Summary collapse
-
#evaluator ⇒ Object
Returns the value of attribute evaluator.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(*_) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
82 83 84 85 |
# File 'lib/vagrant/puppetfile.rb', line 82 def initialize @path = UNSET_VALUE @evaluator = UNSET_VALUE end |
Instance Attribute Details
#evaluator ⇒ Object
Returns the value of attribute evaluator.
80 81 82 |
# File 'lib/vagrant/puppetfile.rb', line 80 def evaluator @evaluator end |
#path ⇒ Object
Returns the value of attribute path.
79 80 81 |
# File 'lib/vagrant/puppetfile.rb', line 79 def path @path end |
Instance Method Details
#finalize! ⇒ Object
94 95 96 97 |
# File 'lib/vagrant/puppetfile.rb', line 94 def finalize! @path = DEFAULT_PUPPETFILE_PATH if @path == UNSET_VALUE @evaluator = DEFAULT_PUPPETFILE_EVALUATOR if @evaluator == UNSET_VALUE end |
#validate(*_) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/vagrant/puppetfile.rb', line 87 def validate(*_) errors = _detected_errors errors << 'path must be a String' unless @path.is_a? String errors << 'evaluator must be a String' unless @evaluator.is_a? String Hash[Vagrant::Puppetfile::Plugin.name => errors] end |