Class: Berkshelf::VagrantWrapperError
- Inherits:
-
Vagrant::Errors::VagrantError
- Object
- Vagrant::Errors::VagrantError
- Berkshelf::VagrantWrapperError
- Defined in:
- lib/berkshelf/vagrant/errors.rb
Overview
A wrapper for a BerkshelfError for Vagrant. All Berkshelf exceptions should be wrapped in this proxy object so they are properly handled when Vagrant encounters an exception.
Instance Attribute Summary collapse
- #original ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(original) ⇒ VagrantWrapperError
constructor
A new instance of VagrantWrapperError.
- #to_s ⇒ Object
Constructor Details
#initialize(original) ⇒ VagrantWrapperError
Returns a new instance of VagrantWrapperError.
19 20 21 |
# File 'lib/berkshelf/vagrant/errors.rb', line 19 def initialize(original) @original = original end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(fun, *args, &block) ⇒ Object (private)
29 30 31 |
# File 'lib/berkshelf/vagrant/errors.rb', line 29 def method_missing(fun, *args, &block) original.send(fun, *args, &block) end |
Instance Attribute Details
#original ⇒ Object (readonly)
16 17 18 |
# File 'lib/berkshelf/vagrant/errors.rb', line 16 def original @original end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/berkshelf/vagrant/errors.rb', line 23 def to_s "#{original.class}: #{original.to_s}" end |