Sha256: 6058fdd4441bdd64058c7efa18e903e768068a451b9c329ae942abf223c01545

Contents?: true

Size: 340 Bytes

Versions: 6

Compression:

Stored size: 340 Bytes

Contents

module BetterErrors
  # @private
  class CodeFormatter::Text < CodeFormatter
    def source_unavailable
      "# Source is not available"
    end

    def formatted_lines
      each_line_of context_lines do |highlight, current_line, str|
        sprintf '%s %3d   %s', (highlight ? '>' : ' '), current_line, str
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
better_errors-0.9.0 lib/better_errors/code_formatter/text.rb
better_errors-0.8.0 lib/better_errors/code_formatter/text.rb
better_errors-0.7.2 lib/better_errors/code_formatter/text.rb
better_errors-0.7.0 lib/better_errors/code_formatter/text.rb
better_errors-0.6.0 lib/better_errors/code_formatter/text.rb
better_errors-0.5.0 lib/better_errors/code_formatter/text.rb