Class: VagrantPlugins::RsyncPick::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::RsyncPick::Config
- Defined in:
- lib/vagrant-rsync-pick/config.rb
Constant Summary collapse
- SECTION_NAME =
"rsync_pick"
Instance Attribute Summary collapse
-
#guest_dir ⇒ Object
Returns the value of attribute guest_dir.
-
#host_dir ⇒ Object
Returns the value of attribute host_dir.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate(machine) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 |
# File 'lib/vagrant-rsync-pick/config.rb', line 8 def initialize # @guest_dir = UNSET_VALUE # @host_dir = UNSET_VALUE end |
Instance Attribute Details
#guest_dir ⇒ Object
Returns the value of attribute guest_dir.
6 7 8 |
# File 'lib/vagrant-rsync-pick/config.rb', line 6 def guest_dir @guest_dir end |
#host_dir ⇒ Object
Returns the value of attribute host_dir.
6 7 8 |
# File 'lib/vagrant-rsync-pick/config.rb', line 6 def host_dir @host_dir end |
Instance Method Details
#validate(machine) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/vagrant-rsync-pick/config.rb', line 13 def validate(machine) errors = _detected_errors unless @guest_dir errors << "Config value rsync_pick.guest_dir is required" # errors << I18n.t("vagrant_rsync_pick.validation.guest_dir_required") end unless @host_dir errors << "Config value rsync_pick.host_dir is required" # errors << I18n.t("vagrant_rsync_pick.validation.host_dir_required") end { SECTION_NAME => errors } end |