Class: MelissaData::VagrantPlugin::Config

Inherits:
Vagrant::Config::Base
  • Object
show all
Defined in:
lib/melissadata/vagrant_plugin/config.rb

Overview

A configuration class to configure defaults which are used for MelissaData::VagrantPlugin

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
# File 'lib/melissadata/vagrant_plugin/config.rb', line 9

def initialize
  @target_path = '/opt/melissadata'
end

Instance Attribute Details

#source_pathObject

Returns the value of attribute source_path.



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

def source_path
  @source_path
end

#target_pathObject

Returns the value of attribute target_path.



6
7
8
# File 'lib/melissadata/vagrant_plugin/config.rb', line 6

def target_path
  @target_path
end

Instance Method Details

#validate(errors) ⇒ Object



13
14
15
# File 'lib/melissadata/vagrant_plugin/config.rb', line 13

def validate(errors)
  errors.add(I18n.t("vagrant.plugins.melissadata.config_directory")) if target_path && !target_path.is_a?(String)
end