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:
parent
8ecaf133f3
commit
25c8770a6c
1 changed files with 12 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue