Class: Berkshelf::Vagrant::Action::Upload
- Inherits:
-
Object
- Object
- Berkshelf::Vagrant::Action::Upload
- Defined in:
- lib/berkshelf/vagrant/action/upload.rb
Overview
Instance Attribute Summary collapse
-
#berksfile ⇒ Object
readonly
Returns the value of attribute berksfile.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Upload
constructor
A new instance of Upload.
Constructor Details
Instance Attribute Details
#berksfile ⇒ Object (readonly)
Returns the value of attribute berksfile.
6 7 8 |
# File 'lib/berkshelf/vagrant/action/upload.rb', line 6 def berksfile @berksfile end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/berkshelf/vagrant/action/upload.rb', line 13 def call(env) if Berkshelf::Vagrant.chef_client?(env[:vm].config) upload(env) end @app.call(env) rescue BerkshelfError => e raise VagrantWrapperError.new(e) end |