Flowdock
method

formatted_code_for

Importance_0
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: ActionView::Template::Error
formatted_code_for(source_code, line_counter, indent, output) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/template/error.rb, line 126
        def formatted_code_for(source_code, line_counter, indent, output)
          start_value = (output == :html) ? {} : ""
          source_code.inject(start_value) do |result, line|
            line_counter += 1
            if output == :html
              result.update(line_counter.to_s => "%#{indent}s %s\n" % ["", line])
            else
              result << "%#{indent}s: %s\n" % [line_counter, line]
            end
          end
        end
Register or log in to add new notes.