Class: VagrantPlugins::HostRubyProvisioner::Provisioner
- Inherits:
-
Object
- Object
- VagrantPlugins::HostRubyProvisioner::Provisioner
- Defined in:
- lib/vagrant-host-ruby-provisioner/provisioner.rb
Instance Method Summary collapse
Instance Method Details
#_execute_clean ⇒ Object
4 5 6 |
# File 'lib/vagrant-host-ruby-provisioner/provisioner.rb', line 4 def _execute_clean @config.clean.call end |
#_execute_routine ⇒ Object
8 9 10 |
# File 'lib/vagrant-host-ruby-provisioner/provisioner.rb', line 8 def _execute_routine @config.routine.call end |
#cleanup ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/vagrant-host-ruby-provisioner/provisioner.rb', line 12 def cleanup if @config.cwd routine = method :_execute_clean Dir.chdir @config.cwd, &(proc { routine.call }) else _execute_clean end end |
#provision ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant-host-ruby-provisioner/provisioner.rb', line 22 def provision if @config.cwd routine = method :_execute_routine Dir.chdir @config.cwd, &(proc { routine.call }) else _execute_routine end end |