Exception: ChefCore::Text::TextWrapper::TextError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/chef_core/text/text_wrapper.rb

Overview

TODO - make the checks for these conditions lint steps that run during build

instead of part of the shipped product.

Direct Known Subclasses

InvalidKey, MissingPlural

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lineObject

Returns the value of attribute line.



56
57
58
# File 'lib/chef_core/text/text_wrapper.rb', line 56

def line
  @line
end

Instance Method Details

#set_call_contextObject



57
58
59
60
61
62
63
# File 'lib/chef_core/text/text_wrapper.rb', line 57

def set_call_context
  # TODO - this can vary (8 isn't always right) - inspect
  @line = caller(8, 1).first
  if @line =~ %r{.*/lib/(.*\.rb):(\d+)}
    @line = "File: #{$1} Line: #{$2}"
  end
end