Exception: ChefSpec::Error::ChefSpecError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chefspec/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ChefSpecError



4
5
6
7
8
9
# File 'lib/chefspec/errors.rb', line 4

def initialize(options = {})
  class_name = self.class.to_s.split('::').last
  error_key  = options[:_error_key] || Util.underscore(class_name)

  super I18n.t("chefspec.errors.#{error_key}", options)
end