Class: SuperDiff::OperationTreeFlatteners::MultilineString
- Defined in:
- lib/super_diff/operation_tree_flatteners/multiline_string.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#build_tiered_lines ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# 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 |