Class: SuperDiff::ObjectInspection::InspectionTree::UpdateTieredLines

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/object_inspection/inspection_tree.rb

Instance Method Summary collapse

Instance Method Details

#callObject



148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/super_diff/object_inspection/inspection_tree.rb', line 148

def call
  if rendering.is_a?(Array)
    concat_with_lines
  elsif rendering.is_a?(PrefixForNextNode)
    add_to_prefix
  elsif tiered_lines.any?
    add_to_last_line
  elsif index < nodes.size - 1 || rendering.is_a?(PreludeForNextNode)
    add_to_prelude
  else
    add_to_lines
  end
end