Class: Nugrant::Vagrant::Errors::ParameterNotFoundError

Inherits:
NugrantVagrantError
  • Object
show all
Defined in:
lib/nugrant/vagrant/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = nil, *args) ⇒ ParameterNotFoundError

Returns a new instance of ParameterNotFoundError.



15
16
17
# File 'lib/nugrant/vagrant/errors.rb', line 15

def initialize(options = nil, *args)
  super({:context => compute_context()}.merge(options || {}), *args)
end

Instance Method Details

#compute_contextObject



19
20
21
22
23
# File 'lib/nugrant/vagrant/errors.rb', line 19

def compute_context()
  Helper::Stack.fetch_error_region(caller(), {
    :matcher => /(.+Vagrantfile):([0-9]+)/
  })
end