Exception: ChefApply::Text::TextWrapper::TextError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/chef_apply/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.



55
56
57
# File 'lib/chef_apply/text/text_wrapper.rb', line 55

def line
  @line
end

Instance Method Details

#set_call_contextObject



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

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