Class: SuperDiff::Basic::OperationTreeFlatteners::MultilineString
- Inherits:
-
Core::AbstractOperationTreeFlattener
- Object
- Core::AbstractOperationTreeFlattener
- SuperDiff::Basic::OperationTreeFlatteners::MultilineString
- Defined in:
- lib/super_diff/basic/operation_tree_flatteners/multiline_string.rb
Instance Method Summary collapse
Methods inherited from Core::AbstractOperationTreeFlattener
Instance Method Details
#build_tiered_lines ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/super_diff/basic/operation_tree_flatteners/multiline_string.rb', line 7 def build_tiered_lines operation_tree.map do |operation| Core::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 |