class SuperDiff::OperationTreeFlatteners::MultilineString

Public Instance Methods

build_tiered_lines() click to toggle source
# File lib/super_diff/operation_tree_flatteners/multiline_string.rb, line 4
def build_tiered_lines
  operation_tree.map do |operation|
    Line.new(
      type: operation.name,
      indentation_level: indentation_level,
      # TODO: Test that quotes and things don't get escaped but escape
      # characters do
      value: operation.value.inspect[1..-2].gsub(/\\"/, '"').gsub(/\\'/, "'")
    )
  end
end