1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

formatted_code_for should be private

This commit is contained in:
Guillermo Iguaran 2012-12-31 18:07:21 -05:00
parent 8ecaf133f3
commit 25c8770a6c

View file

@ -93,18 +93,6 @@ module ActionView
formatted_code_for(source_code, start_on_line, indent, output)
end
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
def sub_template_of(template_path)
@sub_templates ||= []
@sub_templates << template_path
@ -131,6 +119,18 @@ module ActionView
'in '
end + file_name
end
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
end
end